- Understanding git
- Anatomy of git
- HEAD
- Think of it as the snapshot of your last commit
- Pointer to the current branch reference, which is the last commit you made or the last commit that was checked out
- Index
- HEAD
- Anatomy of git
- Snapshot of your next commit
This file contains 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
on run {input, parameters} | |
tell application "Finder" | |
set _bounds to get bounds of window of desktop | |
end tell | |
tell application "System Events" | |
set ids to (unix id of processes whose name is equal to "java") | |
repeat with _id in ids | |
tell (first process whose unix id is equal to _id) |
This file contains 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 wpc_get_plugin_dl_count(){ | |
$payload = array( | |
'action' => 'plugin_information', | |
'request' => serialize( | |
(object)array( | |
'slug' => 'pinterest-rss-widget', | |
'fields' => array('description' => true) | |
) | |
) | |
); |
This file contains 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
<?php | |
/** | |
* Using transients on a single loop inside WordPress | |
* | |
* @link http://speckyboy.com/2011/12/14/website-speed-part-3-caching-wordpress/ | |
* / | |
$loop = get_transient( 'loop' ); | |
if ( false === $loop ) { | |
// Show the last 100 tweets from the custom post type tweets. |
This file contains 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 () { | |
'use strict' | |
/** | |
* @module Twerkify | |
* @description Thank you for twerking. Use at your own risk. | |
*/ | |
console.log('Thank you for twerking') | |
var json_request |
This file contains 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 closest(target, selector){ | |
while(target && target.parentNode && Array.prototype.slice.apply(target.parentNode.querySelectorAll(selector)).indexOf(target)<0){ | |
target = target.parentNode; | |
} | |
return target === document ? null : target; | |
} |
This file contains 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 aws = require('aws-sdk'); | |
var kms = new aws.KMS({ region: 'us-east-1' }); | |
var encrypted_slack_hook = 'CiD0R0tv46w7LNpO0GlZpLfZk2O0Oy66IF83rG6olDY7yBK0AQEBAgB49EdL\nb+OsOyzaTtBpWaS32ZNjtDsuuiBfN6xuqJQ2O8gAAACLMIGIBgkqhkiG9w0B\nBwagezB5AgEAMHQGCSqGSIb3DQEHATAeBglghkgBZQMEAS4wEQQMWk63DEyG\ne+3v8STHAgEQgEfYBkRk3roZCsirvAsWbPhGN15PqfGA58M/Vh3ZqHFFCkf9\nceSWkIii4SZz3tlpHu3AXjk3x2AWTCMmVTX2EUkawF5sTNsNZA==\n'; | |
//console.log('Loading function'); | |
exports.handler = function(event, context) { | |
console.log('Received event:', JSON.stringify(event, null, 2)); | |
var p = {CiphertextBlob: new Buffer(encrypted_slack_hook, 'base64')}; |
This file contains 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
const https = require('https'); | |
const url = require('url'); | |
// to get the slack hook url, go into slack admin and create a new "Incoming Webhook" integration | |
const slack_url = 'https://hooks.slack.com/services/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'; | |
const slack_req_opts = url.parse(slack_url); | |
slack_req_opts.method = 'POST'; | |
slack_req_opts.headers = {'Content-Type': 'application/json'}; | |
exports.handler = function(event, context) { | |
(event.Records || []).forEach(function (rec) { |
This file contains 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 path = require('path'); | |
var FastBootServer = require('./lib/models/server'); | |
var outputPath = 'fastboot-dist'; | |
var appName = 'dummy'; | |
var server = new FastBootServer({ | |
appFile: findAppFile(outputPath, appName), | |
vendorFile: findVendorFile(outputPath), | |
htmlFile: findHTMLFile(outputPath) | |
}); |
This file contains 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 myPersonalEmailAddress = 'nam@catapultsports.com'; | |
var aws = require('aws-sdk'); | |
var ses = new aws.SES({apiVersion: '2010-12-01'}); | |
exports.handler = function(event, context) { | |
if (false == !!event.ClientName) | |
{ | |
context.fail('Missing clientName'); | |
return; |
OlderNewer