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
#text-message-lookup.rb | |
require 'sinatra' | |
require 'telapi' | |
Telapi.config do |config| | |
config.account_sid = 'AC6c889024043be37e4dZZZ8b33b800ccfe' | |
config.auth_token = 'dx52d3dsd2a2409692591aed4a280e5b' | |
end | |
carrier = Telapi::Carrier.lookup("2739293842") |
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
@model PartialViewModel | |
<h1>Hello World</h1> | |
<p> | |
I was rendered from a <strong>@Model.Source</strong>! | |
</p> |
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
#gem install 'google-api-client' | |
require 'google/api_client' | |
#Setup auth client | |
client_secrets = Google::APIClient::ClientSecrets.load #client_secrets.json must be present in current directory! | |
auth_client = client_secrets.to_authorization | |
auth_client.update!( | |
:scope => 'https://www.googleapis.com/auth/calendar', | |
:access_type => "offline", #will make refresh_token available |
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 Set-ConnectionStringDatabase { | |
Param( | |
[string]$DatabaseName, | |
[string]$ConnectionStringName='DBConnectionString' | |
) | |
Function Set-ConnectionString{ | |
Param( | |
[string]$ConfigFile, | |
[string]$ConnectionStringName, |
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
#!/bin/bash | |
HEAD_BRANCH=$1 | |
BASE_BRANCH=$2 | |
GH_OAUTH_TOKEN=$3 | |
REPO_NAME="bradyholt/foobar" | |
RELEASE_NOTES_FILE_NAME="release_notes.md" | |
echo "Will now attempt to create and close a PR from ${HEAD_BRANCH} to ${BASE_BRANCH} with comment showing merged PRs." | |
echo "Generating Release Notes..." |
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
#!/usr/bin/env node | |
var fs = require('fs'); | |
var args = fs.readFileSync(process.argv[2], 'utf8'); | |
var changed = false; | |
var jsonPath = null; | |
var json = null; | |
var keyValReplacementString = args.split(' '); | |
keyValReplacementString.forEach(function(i){ |
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
CREATE FUNCTION fred() RETURNS blah AS $$ | |
$$ LANGUAGE 'plpgsql'; | |
SELECT fred(); | |
DROP FUNCTION fred(); |
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
#!/bin/bash | |
# Opens GitHub PR for the current branch | |
BRANCH=$(git branch | grep ^* | sed 's/* //' ) | |
URL="https://github.$(git config remote.origin.url | cut -f2 -d. | tr ':' /)/pull/${BRANCH}" | |
open $URL% |
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
lame -V6 --vbr-new --resample 22 -m m recording.wav |
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 locales = [ | |
'en', // English | |
'es', // Spanish | |
'fr' // French | |
]; | |
function printDaysOfTheWeek(locale) { | |
var daysOfTheWeek = []; | |
var monday = new Date(); | |
monday.setDate(monday.getDate() - (monday.getDay() + 6) % 7); |