Skip to content

Instantly share code, notes, and snippets.

View maxsilver's full-sized avatar
💜

Mackenzie "Max" Seeley maxsilver

💜
View GitHub Profile
git clone --mirror git@github.com:path/to/existing/repo.git
cd new-repo
git config --bool core.bare false
git push --mirror git@github.com:path/to/new/repo.git
wget --recursive --page-requisites --convert-links http://website.example
wget -m -nH http://website.example
@maxsilver
maxsilver / gist:2fcaed55642902f0ac0f
Last active August 29, 2015 14:16
Install System App on Rooted Android Device and other Android changes
# Assuming your in the root directory of an Android Studio project
adb remount
adb push app/build/outputs/apk/app-debug.apk /system/app
adb shell chmod 644 /system/app/app-debug.apk
adb reboot
# Modify system configuration
adb pull /system/build.prop
adb push /system/build.prop
@maxsilver
maxsilver / server
Created November 18, 2014 14:25
Ruby Server
ruby -run -e httpd . -p 5000
@maxsilver
maxsilver / keybase.md
Created July 16, 2014 15:33
keybase.md

Keybase proof

I hereby claim:

  • I am maxsilver on github.
  • I am maxsilver (https://keybase.io/maxsilver) on keybase.
  • I have a public key whose fingerprint is E656 19AA CC8A E626 F08F 2F09 712E 53CD F0B1 607C

To claim this, I am signing this object:

@maxsilver
maxsilver / gist:4add88a2fe063590b9f8
Created June 6, 2014 14:46
Fix Homebrew on OSX 10.10 Yosemite
mostly pulled from http://www.alexfilatov.com/2014/06/03/osx-10-10-yosemite-fix-homebrew/ with changes
$ nano /usr/local/Library/brew.rb
replace first line with
#!/System/Library/Frameworks/Ruby.framework/Versions/Current/usr/bin/ruby -W0
find your homebrew repository, and commit it
@maxsilver
maxsilver / report-exercise.rb
Last active December 13, 2015 20:59 — forked from zdennis/report-exercise.rb
Names incoming parameters for clarity.
#
# The goal of this exercise is work on identifying abstraction which helps simplify, document,
# and separate the concerns going on in file.
#
# Exercise:
# * Find related ideas in the below code
# * Abstract them out (methods, modules, classes, etc, you pick!)
# * If you find multiple ways, then do a separate gist for each way.
# * Rinse repeat until you see no other ways.
#
@maxsilver
maxsilver / github-import.sh
Created October 27, 2011 15:17
Import Gitosis to GitHub
#!/bin/bash
# A simple script to pull a repo off an old host
# (such as git@git.example.com:repo1.git)
# and import it as private repo to github organization
# (git@github.com:example_organization/repo1.git)
# Example Usage ==> ./github-import.sh repo1 repo2 repo3
@maxsilver
maxsilver / infinite-monkey-theorem.rb
Created September 12, 2010 23:18
The infinite monkey theorem states that a monkey hitting keys at random on a typewriter keyboard for an infinite amount of time will almost surely type a given text, such as the complete works of William Shakespeare. http://en.wikipedia.org/wiki/Infinite_
# A million monkeys
# at a million typewriters
# banging on the keys until they have
# the works of Shakespere
# http://en.wikipedia.org/wiki/Infinite_monkey_theorem
puts "Randomly generate Shakespere"
# Number of randomly generated phrases
counter = 0
@maxsilver
maxsilver / pretty-methods.rb
Created June 2, 2010 17:48
Some methods to print pretty method lists
# Some methods to print pretty method lists
# The simple one is from Jason Vogel
# http://jasonvogel.blogspot.com/2007/01/ruby-code-snippet-methods-list.html
puts object.methods.sort.join("\n").to_s+"\n\n"