Skip to content

Instantly share code, notes, and snippets.

Tim Tilberg ttilberg

Block or report user

Report or block ttilberg

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View New mac setup
# Some various moves
defaults write com.apple.screencapture location ~/Downloads && killall SystemUIServer
echo "alias clip=pbcopy
alias ls='ls -G'
alias ll='ls -alG'
export CLICOLOR=1
export LSCOLORS=GxFxCxDxBxegedabagaced
" >> ~/.bash_profile
@ttilberg
ttilberg / config_initializers_geocoder.rb
Last active Apr 27, 2018
Geocoder SQL Server bearing support
View config_initializers_geocoder.rb
# Rewritten bearing function that supports SQL Server:
# - ATAN2 function renamed ATN2
# - Use `%` operator instead of `MOD()` function
# This seems like it would be very reasonable to apply more dynamically.
#
# Original source: https://github.com/alexreisner/geocoder/blob/317832ca2b7ec234fca6039184686d921bac925d/lib/geocoder/sql.rb#L57
#
module Geocoder
module Sql
##
@ttilberg
ttilberg / converter.rb
Last active Sep 26, 2019
Utilities to unobfuscate a certain class of js files.
View converter.rb
require 'net/http'
require 'json'
require 'uri'
require 'yaml'
##
# Make a certain obfuscated js less obnoxious to analyze.
#
class Obfuscated
attr_accessor :script
View has_required_properties_test.rb
require 'pry'
class Thing
REQUIRED = [:a,:b,:c]
attr_accessor :a, :b, :c, :d
def initialize( a: '', b: '', c: '', d: '')
@a = a.to_s
@b = b.to_s
You can’t perform that action at this time.