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
module ActiveRecord | |
module ConnectionAdapters | |
module Sqlserver | |
module Quoting | |
def quote(value, column = nil) | |
case value | |
when String, ActiveSupport::Multibyte::Chars | |
if column && column.type == :integer && value.blank? | |
nil | |
elsif column && column.type == :binary |
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
# encoding: UTF-8 | |
require 'securerandom' | |
require 'fileutils' | |
dir = "tmp/#{SecureRandom.hex(4)}_gems" | |
gems = `bundle exec gem list`.split | |
licenses = { | |
'Apache 2.0' => [], | |
'MIT' => [], |
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 | |
$(git fetch --prune) | |
for branch in $(git branch -r); do | |
if ([ "$branch" == "origin/HEAD" ] || [ "$branch" == "origin/master" ] || [ "$branch" == "origin/develop" ] || [ "$branch" == "->" ] || [[ "$branch" =~ origin\/[0-9]+\.[0-9](\.[0-9])?$ ]]); then | |
continue | |
fi | |
printf "$(git log $branch -n1 --pretty=format:"%an (%ad): $branch" --date=short)\n"; | |
done | sort |
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
module Enumerable | |
def deep_find(key) | |
if respond_to?(:key?) && key?(key) | |
self[key] | |
else | |
found = nil | |
find { |*a| v = a.last; found = v.is_a?(Enumerable) ? v.deep_find(key) : nil } | |
found | |
end | |
end |
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
require 'dfp_api' | |
require 'httparty' | |
require 'oauth2' | |
CLIENT_ID = 'MY CLIENT ID' | |
CLIENT_SECRET = 'MY CLIENT SECRET' | |
NETWORK_CODE = 'MY NETWORK CODE' | |
dfp = DfpApi::Api.new({ | |
authentication: { |
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 ruby | |
require 'active_support/all' | |
require 'gmail' | |
require 'great_schools' | |
require 'nokogiri' | |
require 'open-uri' | |
require 'sqlite3' | |
def db |
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
# | |
# $Id: //poco/1.4/build/config/AppleTV#2 $ | |
# | |
# AppleTV | |
# | |
# Build settings for tvOS, using Apple's tvOS SDK | |
# | |
# | |
# General Settings |
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
// | |
// CallDirectoryHandler.swift | |
// SelectiveHearing.BlockEveryone | |
// | |
// Created by Michael Sepcot on 4/14/17. | |
// Copyright © 2017 Michael Sepcot. All rights reserved. | |
// | |
import Foundation | |
import CallKit |
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
PLAINTEXT = %w(A B C D E F G H I J K L M N O P Q R S T U V W X Y Z) | |
CRYPTTEXT = %w(E L P H A N T B C D F G I J K M O Q R S U V W X Y Z) | |
input = "Cj qarmkjra sk ykuq gers gassaq, C ei waeqcjt iy ngctbs rucs lus hk jks beva e lqe kj. Cn yku waqa baqa, C wkugh sefa yku cjsk sba teqhaj ikhuga ejh gaej kvaq sba skiesk lahr rk sbes er yku skkf ia nqki labcjh, iy nepa wkugh la mqarrah cjsk sba nqetqejs tqaaj gaevar wcsb aepb sbqurs.".upcase | |
input.split("").each do |character| | |
if position = CRYPTTEXT.find_index(character) | |
print PLAINTEXT[position] | |
else | |
print character |
OlderNewer