Skip to content

Instantly share code, notes, and snippets.

@TannerFilip
TannerFilip / keybase.md
Last active August 29, 2015 14:01
keybase.md

Keybase proof

I hereby claim:

  • I am tannerfilip on github.
  • I am tannerfilip (https://keybase.io/tannerfilip) on keybase.
  • I have a public key whose fingerprint is 5A26 8E93 8D2B 5D4C 2BDE 95B2 76E4 4366 90D9 9A66

To claim this, I am signing this object:

#!/bin/bash --login
if [[ "$1" == "setup" ]]; then
sudo -su discourse /bin/bash --login <<'EOF'
cd /var/www/discourse
RUBY_GC_MALLOC_LIMIT=90000000 RAILS_ENV=production bundle exec rake db:migrate
RUBY_GC_MALLOC_LIMIT=90000000 RAILS_ENV=production bundle exec rake assets:precompile
EOF
elif [[ "$1" == "start" ]]; then
sudo -su discourse /bin/bash --login <<'EOF'
RUBY_GC_MALLOC_LIMIT=90000000 RAILS_ROOT=/var/www/discourse RAILS_ENV=production NUM_WEBS=2 bluepill --no-privileged -c ~/.bluepill load /var/www/discourse/config/discourse.pill
package { "sudo":
ensure => installed
}
package { "zsh":
ensure => installed
}
package { "tcsh":
ensure => installed
@TannerFilip
TannerFilip / rkhunter_mailer.sh
Created June 29, 2013 23:41
Script to run rkhunter and mail (via smtp) the results.
#!/bin/sh
email="you@example.com" #Your email address
( echo "To:" $email
echo "From: from@example.com"
echo "Subject: rkhunter $(date)"
) >> rkhunter_out.txt
( rkhunter --versioncheck
rkhunter --update
rkhunter --check --nocolor --sk
Traceback (most recent call last):
File "adbfuzz.py", line 377, in <module>
main()
File "adbfuzz.py", line 45, in main
fuzzInst = ADBFuzz(cfgFile)
File "adbfuzz.py", line 91, in __init__
self.maxLogSize = self.cfg.getint('main', 'maxLogSize')
File "/usr/lib/python2.6/ConfigParser.py", line 340, in getint
return self._get(section, int, option)
File "/usr/lib/python2.6/ConfigParser.py", line 337, in _get
tanner@tanner-laptop:~/ADBFuzz$ python2.6 adbfuzz.py helloworld.cfg run
Traceback (most recent call last):
File "adbfuzz.py", line 377, in <module>
main()
File "adbfuzz.py", line 45, in main
fuzzInst = ADBFuzz(cfgFile)
File "adbfuzz.py", line 90, in __init__
self.runTimeout = self.cfg.getint('main', 'runTimeout')
File "/usr/lib/python2.6/ConfigParser.py", line 340, in getint
return self._get(section, int, option)
$wgGroupPermissions['*']['read'] = false;
$wgGroupPermissions['*']['edit'] = false;
$wgGroupPermissions['*']['createaccount'] = false;
@TannerFilip
TannerFilip / gist:1513129
Created December 23, 2011 04:21
SOPA template
To whom it may concern,
My name is <name> and I've noticed that there is a lack of media coverage regarding bill known as SOPA, or the E-PARASITE act. SOPA, which stands for "Stop Online Piracy Act" would allow corporations, and the US government to seize a domain name which they think is violating copyright, or trademark laws. While this sounds good in theory, in practice it would destroy the Internet as we know it today.
SOPA could cause many popular websites, such as Wikipedia, YouTube, and even Facebook to be shut down. The bill could also prevent Internet start-ups from growing and thriving as they can today. Some representatives in congress say this SOPA will create jobs, by stopping Internet piracy, but in reality it may do the opposite by making it harder for start-ups to grow. Stanford Law has even found parts of SOPA to be unconstitutional, as it could be abridging the freedom of speech.
Many companies including Google, Yahoo!, Mozilla, LinkedIn, Twitter, and online communities su
Traceback (most recent call last):
File "window.py", line 14, in <module>
create_window()
File "window.py", line 4, in create_window
window = gtk.window()
AttributeError: 'module' object has no attribute 'window'
import gtk
def create_window():
window = gtk.window()
window.set_default_size(200, 200)
window.connect('destroy', gtk.main_quit)
label = gtk.Label('Hello World')
window.add(label)