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
javascript:function r(d){d.oncontextmenu=null;d.onselectstart=null;d.ondragstart=null;d.onkeydown=null;d.onmousedown=null; d.body.oncontextmenu=null;d.body.onselectstart=null;d.body.ondragstart=null;d.body.onkeydown=null; d.body.onmousedown=null;};function unify(w){r(w.document);if(w.frames.length>0){for(var i=0;i<w.frames.length;i++){try{unify(w.frames[i].window);}catch(e){}};};}; unify(self);jQuery(document).unbind();jQuery('div, a, p, body, html, section').unbind(); |
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
import android.Manifest; | |
import android.content.DialogInterface; | |
import android.content.Intent; | |
import android.content.pm.PackageManager; | |
import android.location.Location; | |
import android.location.LocationListener; | |
import android.os.Bundle; | |
import android.provider.Settings; | |
import android.support.v4.app.ActivityCompat; | |
import android.support.v7.app.AlertDialog; |
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 | |
# | |
# StackScript Bash Library | |
# | |
# Copyright (c) 2010 Linode LLC / Christopher S. Aker <[email protected]> | |
# All rights reserved. | |
# | |
# Redistribution and use in source and binary forms, with or without modification, | |
# are permitted provided that the following conditions are met: | |
# |
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
1. | |
kextstat -kl | awk '!/com\.apple/{printf "%s %s\n", $6, $7}' | |
2. | |
{ sudo launchctl list | sed 1d | awk '!/0x|com\.(apple|openssh|vix\.cron)|org\.(amav|apac|cups|isc|ntp|postf|x)/{print $3}'; echo; sudo defaults read com.apple.loginwindow LoginHook; echo; sudo crontab -l; } 2> /dev/null | |
3. | |
{ launchctl list | sed 1d | awk '!/0x|com\.apple|org\.(x|openbsd)/{print $3}'; echo; crontab -l 2> /dev/null; } | |
4. |
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
if(typeof(window.console) === 'undefined') { | |
window.console = { | |
log: function() {} | |
}; | |
} |
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/sh | |
## | |
# This is a script with usefull tips taken from: | |
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx | |
# | |
# Run in interactive mode with: | |
# $ sh -c "$(curl -sL https://gist.github.com/sydneyitguy/5572931/raw/osx_hack.sh)" | |
# | |
# or run it without prompt questions: |
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
commands: | |
fix-01: | |
command: mkdir /var/app/ondeck/vendor /var/app/ondeck/public /var/app/support/bundle /var/app/support/assets /var/app/support/cache | |
fix-02: | |
command: ln -s /var/app/support/bundle /var/app/ondeck/vendor | |
fix-03: | |
command: ln -s /var/app/support/assets /var/app/ondeck/public | |
fix-04: | |
command: ln -s /var/app/support/cache /var/app/ondeck/vendor | |
fix-05: |
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
db.getMongo().setSlaveOk() | |
db.currentOp() | |
db.killOp() | |
show dbs | |
show collections | |
db.events.find({event: 'view', date: { '$gte': 1338472800, '$lt': 1341064800 } }).count() |
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
vi /etc/my.cnf | |
log_bin = /usr/local/var/mysql/mysql-bin.log | |
expire_logs_days = 10 | |
max_binlog_size = 100M | |
mysql.server restart | |
mysql -u root -e "PURGE BINARY LOGS BEFORE '2013-12-15 10:06:06';" |
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
# Remove all Thumbs.db files reculsively from current directory | |
find ./ -name "Thumbs.db" -exec rm '{}' \; | |
# Restore default permissions | |
chmod 755 $(find ./ -type d) && chmod 644 $(find ./ -type f) |