This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function getPostsWithMeta() { | |
| global $wpdb; | |
| $query = " | |
| SELECT DISTINCT | |
| ID, | |
| post_title, | |
| post_date, | |
| guid | |
| FROM wp_posts |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // required plugin: https://github.com/jisaacks/ChainOfCommand | |
| // Preferences > Key Bindings - User | |
| [ | |
| { "keys": ["alt+shift+r"], | |
| "command": "chain", | |
| "args": { | |
| "commands": [ | |
| ["unindent", { | |
| "context": [ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Preferences > Key Bindings - User | |
| { "keys": ["ctrl+shift+w"], "command": "noop"} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var getPreloader = function(dest, options){ | |
| options = $.extend({ | |
| alt: '', | |
| css: { | |
| display: 'block', | |
| margin: '30px auto' | |
| }, | |
| src: '/assets/ajax_loaders/loader-big.gif' | |
| }, options); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // copied from http://stackoverflow.com/a/2790686 | |
| 'use strict'; | |
| // Add ECMA262-5 method binding if not supported natively | |
| // | |
| if (!('bind' in Function.prototype)) { | |
| Function.prototype.bind= function(owner) { | |
| var that= this; | |
| if (arguments.length<=1) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Warning: if you want add 300+ files your chrome will probably crash. | |
| var a=document.querySelectorAll('.yt-uix-button');for(var i=0,l=a.length;i<l;i++){a[i].click()}; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| .. = cd .. | |
| pro = cd /projects | |
| ll=ls -Xal --color | |
| ip = ipconfig | grep "IPv4" | |
| build = npm run build | |
| bb = npm run build | |
| n = npm $* |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| sudo chsh -s /bin/bash username |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // object.watch by Eli Grey: https://gist.github.com/eligrey/175649 | |
| if (!Object.prototype.watch) | |
| { | |
| Object.prototype.watch = function (prop, handler) | |
| { | |
| var val = this[prop], | |
| getter = function () | |
| { | |
| return val; | |
| }, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| git checkout <bad-commit> | |
| # ... make your changes ... | |
| git commit --amend -v | |
| git rebase --onto HEAD <bad-commit> <checked-out-branch> |