This file contains 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
find * ! -user admin ! -user root -user nobody -type d -maxdepth 1 -exec chown -R DOMAIN\\{}:DOMAIN\\domain\ users {} \; -exec chmod -R 640 {} \; -exec echo "[" `date -Iseconds` "]: PERMISSIONS UPDATED FOR " {} \; |
This file contains 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
//Execute the following javascript at the Award selection page of SFP and wait for the message 'success! :)' | |
var script = document.createElement("script"); | |
script.src = "https://code.jquery.com/jquery-2.1.1.min.js"; | |
script.type = "text/javascript"; | |
document.getElementsByTagName("head")[0].appendChild(script); | |
var interval = setInterval(function() { | |
if (typeof jQuery === "function") { | |
clearInterval(interval); | |
jQuery(function($) { | |
var $dom = $('a[target="awardDescription"]') |
This file contains 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 | |
#mongod on terminal with logging to stdout (so dirty it smells) | |
#alias to 'mongod' for extra points | |
tail -f /usr/local/var/log/mongodb/mongo.log &;mongod --config /usr/local/etc/mongod.conf;kill $(ps | grep 'tail -f /usr/local/var/log/mongodb/mongo.log' | head -1 | awk '{ print $1 }') |
This file contains 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 | |
#Get sudo | |
sudo echo | |
switch_version() | |
{ | |
select version | |
do | |
echo |
This file contains 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 | |
# http://stackoverflow.com/questions/3878624/how-do-i-programmatically-determine-if-there-are-uncommited-changes | |
require_clean_work_tree () { | |
# Update the index | |
git update-index -q --ignore-submodules --refresh | |
err=0 | |
# Disallow unstaged changes in the working tree | |
if ! git diff-files --quiet --ignore-submodules --; then |
This file contains 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 | |
# usage: script.name <url_to_ping> | |
url=$1 | |
while true | |
do | |
curl -iI $url | |
sleep 60 | |
done |
This file contains 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
INSERT INTO ew_events ( | |
id, | |
name, | |
CONTENT, | |
url, | |
img, | |
LOCATION, | |
lat, | |
lng, | |
date_start, |
This file contains 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
class DetectNode | |
MIN_VER = [0, 10, 0] | |
def self.detect | |
node_bins.each do |node| | |
detected_version = (`#{node} --version`)[1..-1].split(".") rescue [0,0,0] | |
if detected_version[0].to_i >= MIN_VER[0] and | |
detected_version[1].to_i >= MIN_VER[1] and | |
detected_version[2].to_i >= MIN_VER[2] | |
return node |
This file contains 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
$('tr > td:nth-child(3) > h2 > a').each(function() { $(this).attr({ href: $(this).attr('href').match(/\('(.*)',.*/, "")[1], target: '_blank' }); }); |
This file contains 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 'net/telnet' | |
localhost = Net::Telnet::new("Host" => "localhost", "Port" => 30002) | |
for count in 0..9999 | |
pin = sprintf("%4d", count) | |
puts "Trying #{pin}" | |
localhost.cmd("String" => "UoMYTrfrBFHyQXmg6gzctqAwOmw1IohZ #{pin}", "Match" => /^Wrong!.*/n) { |a| puts a } | |
end | |
localhost.close |
OlderNewer