most of these require logout/restart to take effect
# Enable character repeat on keydown
defaults write -g ApplePressAndHoldEnabled -bool false
# Set a shorter Delay until key repeat
<?php | |
/** | |
* Convert a comma separated file into an associated array. | |
* The first row should contain the array keys. | |
* | |
* Example: | |
* | |
* @param string $filename Path to the CSV file | |
* @param string $delimiter The separator used in the file | |
* @return array |
I wrote a really simple JavaScript script that uses jQuery to extract all the categories from Facebook's "Create a page" page.
validates_presence_of | |
# Attribute must not be blank (nil, false, "", " ",[] ,{}) | |
# :message => "can't be blank" | |
validates_length_of | |
# Attribute must meet the length requirements of the options | |
# :is, :minimum(integer) | |
# :within, :in(range) | |
# :wrong_length => "is the wrong length (should be {{count}} characters)" | |
# :too_short => "is too short (minimum is {{count}} characters)" |
I have always struggled with getting all the various share buttons from Facebook, Twitter, Google Plus, Pinterest, etc to align correctly and to not look like a tacky explosion of buttons. Seeing a number of sites rolling their own share buttons with counts, for example The Next Web I decided to look into the various APIs on how to simply return the share count.
If you want to roll up all of these into a single jQuery plugin check out Sharrre
Many of these API calls and methods are undocumented, so anticipate that they will change in the future. Also, if you are planning on rolling these out across a site I would recommend creating a simple endpoint that periodically caches results from all of the APIs so that you are not overloading the services will requests.
brew install git bash-completion
Configure things:
git config --global user.name "Your Name"
git config --global user.email "[email protected]"
A theme for the sidebar in Sublime Text to match the workspace of the Monokai theme.
This theme only modifies the sidebar to better match the Monokai theme, without modifying any of the styling elsewhere defined by Monokai.
File location: Packages/User
For a theme that extends beyond just the sidebar, visit https://gist.github.com/umpirsky/5842174
#!/bin/sh | |
### | |
# SOME COMMANDS WILL NOT WORK ON macOS (Sierra or newer) | |
# For Sierra or newer, see https://github.com/mathiasbynens/dotfiles/blob/master/.macos | |
### | |
# Alot of these configs have been taken from the various places | |
# on the web, most from here | |
# https://github.com/mathiasbynens/dotfiles/blob/5b3c8418ed42d93af2e647dc9d122f25cc034871/.osx |
#!/bin/sh | |
# | |
# Shell script that configures gnome-terminal to use xoria256 theme | |
# colors. Written for Debian Wheezy. | |
# | |
# AUTHOR: Igor Kalnitsky <[email protected]> | |
# LICENSE: GNU GPL v3 | |
PALETTE="#121212121212:#D7D787878787:#AFAFD7D78787:#F7F7F7F7AFAF:#8787AFAFD7D7:#D7D7AFAFD7D7:#AFAFD7D7D7D7:#E6E6E6E6E6E6:#121212121212:#D7D787878787:#AFAFD7D78787:#F7F7F7F7AFAF:#8787AFAFD7D7:#D7D7AFAFD7D7:#AFAFD7D7D7D7:#E6E6E6E6E6E6" | |
BG_COLOR="#1C1C1C1C1C1C" |