Gamecreatures'  Blog
Gamecreatures' Blog
Software Development Adventures
Skip to content
  • Home
  • Hacking
  • Visuals
  • About

Code Snippets

There are 13 posts filed in Code Snippets (this is page 1 of 3).

Post navigation

Change screenshot file format Mac OS X

defaults write com.apple.screencapture type jpg; killall SystemUIServer 
# Your options are JPG, TIFF, GIF, PDF and PNG. 
in Code Snippets

Directly send an e-mail in rails without template

Snippet to directly send an e-mail in Rails, without templates

ActionMailer::Base.mail(
  from: "gamecreatre@example.com",
  to: "receiver@example.com",
  subject: "Sample Subject",
  body: "Message Body"
).deliver
in Code Snippets

Snippet to find string files of a given filename

find . -name config.rb -print0 | xargs -0 grep 'search-thing' 
in Code Snippets

Extract single table from a MySQL dump

sed -n -e '/DROP TABLE.*`table_name`/,/UNLOCK TABLES/p' dump.sql > table_name.sql

Source: https://ruleoftech.com/2019/restore-single-table-from-full-mysql-database-dump

in Code Snippets

Find to find files newer than

find . -newermt '14 days ago' ## minutes/hours etc.. see date input formats
in Code Snippets

Post navigation

Search

Archives

Tags

actionscript ajax apache bash blog book bundler c++ calendar date encoding flash freebsd git httpd ie install java javascript legacy libhttpd mac memory-leak microsoft mysql osx os x php ports prototype qt rails rsync ruby ruby on rails shell shell-script snippet sourceforge tools unix utf8 windows wordpress xml

api

  • Haml
  • Ruby API Refs
  • Sass

Blogroll

  • Lnav

frontpage

  • GitHub

Links

  • Java libhttpd
  • QtAwesome – Font Awesome Support for Qt

stock-resources

  • Sock XCHNG

tools

  • Apple Mail Spy Pixel Blocker
  • Borg Backup
  • Conversion
  • Dead Pixel Fixer
  • Download youtube movies
  • excalidraw.com
  • Gitea
  • MysqlTuner
  • TestDisk
  • TINY Helpers
  • Tiny Helpers

webdevelopment

  • Browser Default Styles
  • Flatpickr
  • Flexbox Adventure
  • Modernizr
  • Tiny Helpers
Independent Publisher empowered by WordPress