I hereby claim:
- I am amcclosky on github.
- I am amcclosky (https://keybase.io/amcclosky) on keybase.
- I have a public key whose fingerprint is 879B 64FD F8D4 66E1 4141 544B DB96 9549 BB9F CB5E
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
SELECT concat('alter table ',table_schema,'.',table_name,' DROP FOREIGN KEY ',constraint_name,';') from information_schema.table_constraints WHERE constraint_type='FOREIGN KEY' AND table_schema='<database_name>'; |
\begin{itemize} | |
\renewcommand{\labelitemi}{ } | |
\item | |
... |
module RawSqlUtil | |
def sql_select(sql, params) | |
# We have to do this weirdness because sanitize_sql_array is a protected method | |
query = ActiveRecord::Base.send(:sanitize_sql_array, [sql].concat(params)) | |
ActiveRecord::Base.connection.select_all(query) | |
end |
!/usr/bin/env python | |
# current-tasks.py | |
# author: Anthony McClosky - http://amcclosky.com | |
import requests | |
import json | |
JIRA_ROOT_URL = "jira.example.com" | |
JIRA_API_ENDPOINT = "http://%s/rest/api/2.0.alpha1/" % JIRA_ROOT_URL |
task :history => :environment do | |
item = Item.find(21064127) | |
start_date = item.updated.to_date - 90 | |
item.item_logs.delete_all | |
90.times do |i| | |
if i % 7 == 0 | |
item_log = ItemLog.new | |
item_log.company_id = item.company_id | |
item_log.item_id = item.id | |
item_log.beforePrice = item.price |
package com.amcclosky.nativelib; | |
import java.io.File; | |
import java.io.IOException; | |
import java.util.logging.Level; | |
import java.util.logging.Logger; | |
public class NativeLibrary { | |
public static final long NULL = 0; | |
protected static final Logger log = Logger.getLogger(Peer.class.getPackage().getName()); |
# Start an HTTP server from a directory, optionally specifying the port | |
# via - http://dl.dropbox.com/u/39519/talks/io-tooling/index.html#13 | |
function server() { | |
local port="${1:-8000}" | |
open "http://localhost:${port}/" | |
python -m SimpleHTTPServer "$port" | |
} |
0 - Read http://blog.databigbang.com/running-your-own-anonymous-rotating-proxies/ | |
1 - Install monit, haproxy, tor and delegated. | |
2 - Setup your environment in the setup.rb file | |
3 - Just run > ruby setup.rb | |
4 - ........... | |
5 - PROFIT! > http://www.southparkstudios.com/clips/151040/the-underpants-business |
javascript:(function(){ $('.profiler-results').toggle(); })(); |