Skip to content

Instantly share code, notes, and snippets.

@macodev
macodev / jquery.flipbook.js
Created January 20, 2016 14:28
jQuery plugin to display an animated image sequence. Added options for callback methods that are triggered when animation starts/ends.
//By David Keegan
//InScopeApps.com
//http://inscopeapps.com/demos/flipbook/
(function($){
$.fn.flipbook = function(options){
options = $.extend({
'start': 0, //start frame
'end': 100, //end frame, must be greater then start
'step': 1, //number of frames to step over while animating
@macodev
macodev / phpbirthday
Created June 8, 2015 08:10
Happy Birthday loop
function happyBirthday($name){
for($i = 0; $i < 4; $i++) {
printf("Happy birthday %s!\n", ($i === 2) ? "dear {$name}" : "to you");
}
}
happyBirthday('PHP');

Keybase proof

I hereby claim:

  • I am macodev on github.
  • I am macodev (https://keybase.io/macodev) on keybase.
  • I have a public key whose fingerprint is 1AB0 7BE9 766F CD3B F86D CAE5 E13B 83CF EF95 3F32

To claim this, I am signing this object:

@macodev
macodev / Sublime Text packages - mac
Last active September 3, 2015 07:17
Sublime Text Packages
AdvancedNewFile
Typescript
Blade Snippets
DocBlockr
Emmet
File Navigator
Insert Date
Laravel Blade Highlighter
Less
Package Control
@macodev
macodev / Default (Linux).sublime-keymap
Last active January 4, 2016 14:29
Sublime Text 3 keymap and settings for Ubuntu
[
{ "keys": ["ctrl+shift+c"], "command": "toggle_comment", "args": { "block": false } },
{ "keys": ["ctrl+alt+c"], "command": "toggle_comment", "args": { "block": true } },
{ "keys": ["super+shift+r"], "command": "reindent" , "args": {"single_line": false} },
{ "keys": ["super+ù"], "command": "indent" },
{ "keys": ["super+à"], "command": "unindent" },
{ "keys": ["super+v"], "command": "paste_and_indent" },
{ "keys": ["super+shift+v"], "command": "paste" }
]
@macodev
macodev / macodev.zsh-theme
Last active December 27, 2015 15:59
macodev zsh theme
# macodev simple prompt
PROMPT='%{$fg[green]%}%~%{$fg_bold[blue]%}$(git_prompt_info)%{$reset_color%}%{$fg[green]%}
➤ %{$reset_color%}'
ZSH_THEME_GIT_PROMPT_PREFIX=" - "
ZSH_THEME_GIT_PROMPT_SUFFIX=" "
ZSH_THEME_GIT_PROMPT_DIRTY=" ✗"
ZSH_THEME_GIT_PROMPT_CLEAN=" ✔"
@macodev
macodev / .zshrc-mac
Last active October 19, 2021 20:42
.zshrc settings
# PATHS
export MAMP_PATH=/Applications/MAMP/bin/php/php5.6.2/bin
export GIT_PATH=/usr/local/git/bin
export PATH="/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin"
export RVM_PATH=$HOME/.rvm/bin
export PATH="$MAMP_PATH:$GIT_PATH:$RVM_PATH:$PATH"
# export MANPATH="/usr/local/man:$MANPATH"
# Path to your oh-my-zsh installation.
export ZSH=$HOME/.oh-my-zsh
@macodev
macodev / Preferences.sublime-settings (mac)
Last active December 26, 2015 18:29
Sublime Text 3 settings
{
"close_windows_when_empty": true,
"color_scheme": "Packages/Theme - Spacegray/base16-eighties.dark.tmTheme",
"default_line_ending": "unix",
"enable_telemetry": false,
"ensure_newline_at_eof_on_save": true,
"file_exclude_patterns":
[
".gitignore",
".DS_Store",
@macodev
macodev / gist:4985042
Created February 19, 2013 11:31
Mac OSX custom keybindings in ˜/Library/KeyBindings/DefaultKeyBinding.dict for IT keyboard
{
/* Custom Key Bindings */
"§" = ("insertText:", "}");
"°" = ("inesertText:", "{");
"ç" = ("insertText:", "#");
}
@macodev
macodev / Default (OSX).sublime-keymap - with PHPStorm keys
Last active February 15, 2016 11:18
Default (OSX).sublime-keymap
[
{ "keys": ["ctrl+shift+c"], "command": "toggle_comment", "args": { "block": false } },
{ "keys": ["ctrl+alt+c"], "command": "toggle_comment", "args": { "block": true } },
{ "keys": ["super+alt+l"], "command": "reindent" , "args": {"single_line": false} },
{ "keys": ["super+v"], "command": "paste_and_indent" },
{ "keys": ["super+shift+v"], "command": "paste" },
{ "keys": ["super+up"], "command": "expand_region" },
{ "keys": ["super+down"], "command": "expand_region", "args": {"undo": true}, "context": [{ "key": "expand_region_soft_undo" }] },
{ "keys": ["super+shift+up"], "command": "swap_line_up" },
{ "keys": ["super+shift+down"], "command": "swap_line_down" },