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
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
#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
@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
#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
var http = require('http') | |
var port = process.env.PORT || 1337; | |
var fs = require('fs'); | |
var url = require('url'); | |
var pathColor = '0x0000ff'; | |
var pathWeight = '5'; | |
var mapSize = '640x400'; | |
var houstonCoordinates = '29.73820459,-95.4696264'; | |
var sanDiegoCoordinates = '32.7153292, -117.1572551'; |
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 New-Migration { | |
param ( | |
[string]$name | |
) | |
$project = Get-Project | |
$projectDirectory = Split-Path $project.FullName | |
$scriptDirectory = $projectDirectory + "\Migrate" | |
$fileNameBase = (Get-Date -UFormat "%y%m%d%H%M%S") | |
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
param ($computerName, $username, $password, $targetFile, $ruleName, $enabled) | |
trap | |
{ | |
write-output $_ | |
exit 1 | |
} | |
$securePassword = ConvertTo-SecureString $password -AsPlainText -Force | |
$credentials = New-Object System.Management.Automation.PsCredential($username, $securePassword) |
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
param ($computerName, $username, $password, $targetFile) | |
trap | |
{ | |
write-output $_ | |
exit 1 | |
} | |
$securePassword = ConvertTo-SecureString $password -AsPlainText -Force | |
$credentials = New-Object System.Management.Automation.PsCredential($username, $securePassword) |
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
param ([Parameter(Mandatory=$True)] $clean_path, [Parameter(Mandatory=$True)] $search_pattern, [Parameter(Mandatory=$True)] $max_days) | |
# get the current date | |
$curr_date = Get-Date | |
# determine how far back we go based on current date | |
$del_date = $curr_date.AddDays(-($max_days)) | |
Get-ChildItem $clean_path | Where {$_.Attributes -eq 'Directory'} | ` | |
Foreach-Object{ |