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:
| var parser = document.createElement('a'); | |
| parser.href = "http://example.com:3000/pathname/?search=test#hash"; | |
| parser.protocol; // => "http:" | |
| parser.hostname; // => "example.com" | |
| parser.port; // => "3000" | |
| parser.pathname; // => "/pathname/" | |
| parser.search; // => "?search=test" | |
| parser.hash; // => "#hash" | |
| parser.host; // => "example.com:3000" |
| #!/usr/bin/env ruby | |
| if ARGV[0].nil? || ARGV[0].match(/-h/) | |
| puts "Usage : #{$0} github_username dash_sqlite_db char_appended_to_keyword [no_comments]" | |
| exit | |
| end | |
| require 'net/http' | |
| require 'open-uri' | |
| #require 'awesome_print' |
To setup your computer to work with *.test domains, e.g. project.test, awesome.test and so on, without having to add to your hosts file each time.
| #!/usr/bin/php -qC | |
| <?php | |
| /****************************************************************************** | |
| * | |
| * @file gitolab.php | |
| * @author Benoit Zohar | |
| * @link http://benoitzohar.fr/ | |
| * @last-edited 2015-01-09 | |
| * @description Migrate projects from Gitolite to GitLab |
This gist has moved to a proper git repo so people can make pull requests: https://github.com/Zenexer/internet-reference/blob/main/Mac%20Keyboard%20Symbols.md
| <?xml version="1.0" encoding="UTF-8"?> | |
| <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> | |
| <xsl:template match="/"> | |
| <!-- This stylesheet will be loaded by the browser, when the Lua script, below --> | |
| <!-- inserts a reference to it in the XML error response from S3. --> | |
| <!-- Place this file in the bucket as /error.xsl --> | |
| <!-- set the Content-Type to text/xsl and make the file public --> | |
| <!-- also you should probably remove this comment block :) --> | |
| <html> | |
| <title>We’ve encountered a problem</title> |
| mysql.server stop # kill the process if it fails | |
| brew uninstall mysql56 | |
| brew update | |
| brew install mysql | |
| cp /usr/local/Cellar/mysql/5.7.12/support-files/my-default.cnf /usr/local/etc/my.cnf | |
| brew services start mysql # don't run via tmux | |
| mysql_upgrade -u root --force | |
| brew services restart mysql # don't run via tmux | |
| cd ~/Code/17hats/17hats | |
| bundle exec gem uninstall -a mysql2; bundle install |
| require 'benchmark' | |
| require 'benchmark/ips' | |
| require 'ostruct' | |
| require 'active_model' | |
| BillingAddressStruct = Struct.new(:street, :city, :zipcode, :country, :state) | |
| BillingAddressOpenStruct = OpenStruct | |
| BillingAddressStructFromHash = Struct.new(:street, :city, :zipcode, :country, :state) do |