This gist shows how to create a GIF screencast using only free OS X tools: QuickTime, ffmpeg, and gifsicle.
To capture the video (filesize: 19MB), using the free "QuickTime Player" application:
| window.usesNoAdBlocker = true; |
| # tar a folder | |
| tar -pczf web.tar.gz web/ | |
| # untar | |
| tar xvfz web.tar.gz | |
| tar xfz web.tar |
| /* | |
| #ie10 will only be red in MSIE 10, | |
| both in high contrast (display setting) and default mode | |
| */ | |
| @media screen and (-ms-high-contrast: active), (-ms-high-contrast: none) { | |
| #ie10 { color: red; } | |
| } |
| gifify() { | |
| if [[ -n "$1" ]]; then | |
| if [[ $2 == '--good' ]]; then | |
| ffmpeg -i $1 -r 10 -vcodec png out-static-%05d.png | |
| time convert -verbose +dither -layers Optimize -resize 600x600\> out-static*.png GIF:- | gifsicle --colors 128 --delay=5 --loop --optimize=3 --multifile - > $1.gif | |
| rm out-static*.png | |
| else | |
| ffmpeg -i $1 -s 600x400 -pix_fmt rgb24 -r 10 -f gif - | gifsicle --optimize=3 --delay=3 > $1.gif | |
| fi | |
| else |
This is a small collection of scripts showing how to use require.js. It's only one of several ways of setting up a require.js project, but it's enough to get started.
At its core, require.js is about three things:
The following files show how these are achieved.
| #!/bin/bash | |
| mkdir -p ~/.ssh | |
| # generate new personal ed25519 ssh keys | |
| ssh-keygen -o -a 100 -t ed25519 -f ~/.ssh/id_ed25519 -C "rob thijssen <rthijssen@gmail.com>" | |
| ssh-keygen -o -a 100 -t ed25519 -f ~/.ssh/id_robtn -C "rob thijssen <rob@rob.tn>" | |
| # generate new host cert authority (host_ca) ed25519 ssh key | |
| # used for signing host keys and creating host certs |
| <?php | |
| App::uses('Model', 'Model'); | |
| App::uses('String', 'Utility'); | |
| class AppModel extends Model { | |
| /** | |
| * @author Reed Dadoune | |
| * distanceQuery |
This simple script will take a picture of a whiteboard and use parts of the ImageMagick library with sane defaults to clean it up tremendously.
The script is here:
#!/bin/bash
convert "$1" -morphology Convolve DoG:15,100,0 -negate -normalize -blur 0x1 -channel RBG -level 60%,91%,0.1 "$2"
| # Grabbed for reference from http://www.wpbeginner.com/wp-tutorials/how-to-add-an-admin-user-to-the-wordpress-database-via-mysql/ | |
| # Check the table prefix | |
| # Check the user_id to make sure it is the next in sequence | |
| # Replace my name and email to your own | |
| # Username will be demo and the password will be 1234 | |
| INSERT INTO `wp_users` (`ID`, `user_login`, `user_pass`, `user_nicename`, `user_email`, `user_url`, `user_registered`, `user_activation_key`, `user_status`, `display_name`) VALUES ('4', 'mgarrett', MD5('1234'), 'Mike Garrett', 'test@yourdomain.com', '', '2011-06-07 00:00:00', '', '0', 'Mike Garrett'); | |
| INSERT INTO `wp_usermeta` (`umeta_id`, `user_id`, `meta_key`, `meta_value`) VALUES (NULL, '4', 'wp_capabilities', 'a:1:{s:13:"administrator";b:1;}'); | |
| INSERT INTO `wp_usermeta` (`umeta_id`, `user_id`, `meta_key`, `meta_value`) VALUES (NULL, '4', 'wp_user_level', '10'); | |
| # Troubleshooting |