Skip to content

Instantly share code, notes, and snippets.

{"81.106.107.134", 11557, "85.68.221.180", 26525, "91.181.26.113", 26282, "90.23.37.3", 10352, "82.231.4.41", 23146, "78.40.248.119", 18467, "87.162.102.115", 11244, "83.134.85.177", 22039, "86.71.78.198", 27340, "83.52.109.209", "88.161.121.163", 23551, "189.4.214.51", 11715, "87.206.75.133", 26853, "84.105.178.19", 7675, "80.60.67.167", 16939, "195.132.227.3", 19559, "88.217.7.81", "88.207.59.91", 23535, "84.105.107.41", 19291, "213.219.169.94", 16059, "85.0.212.251", 12655, "84.28.114.66", 24638, "82.121.43.214", 11442, "66.249.65.72", "88.176.76.132", 16663, "82.122.35.58", 27370, "79.207.140.219", 332, "91.67.195.83", 6451, "201.1.155.237", 15401, "98.204.52.119", 1092, "212.191.172.6", "87.173.244.219", "85.170.161.91", 25797, "82.126.169.241", 11323, "92.136.246.140", "90.24.14.245", 9414, "213.10.118.244", 9666, "91.154.2.134", 15014, "86.90.79.167", 3307, "88.159.142.135", 18987, "91.5.72.90", 26415, "201.82.174.178", 26694, "86.195.172.11", 25254, "92.67.168.9", 17179, "188.85.98.141", 25694, "68.84
require 'grit'
module ActionView
module Helpers
module AssetTagHelper
def rewrite_asset_path(source)
asset_id = rails_asset_id(source)
if asset_id.blank?
source
else
"/s/#{asset_id}" + source
mysql> EXPLAIN SELECT user_id, COUNT(id) FROM solves WHERE cheated=0 GROUP BY user_id;
+----+-------------+--------+------+-------------------------+-------------------------+---------+-------+---------+----------------------------------------------+
| id | select_type | table | type | possible_keys | key | key_len | ref | rows | Extra |
+----+-------------+--------+------+-------------------------+-------------------------+---------+-------+---------+----------------------------------------------+
| 1 | SIMPLE | solves | ref | index_solves_on_cheated | index_solves_on_cheated | 5 | const | 5884560 | Using where; Using temporary; Using filesort |
+----+-------------+--------+------+-------------------------+-------------------------+---------+-------+---------+----------------------------------------------+
1 row in set (0.00 sec)
class User
has_many :entries
end
class Entry
has_many :images
belongs_to :user
end
class Image
WATCHDIR = ''
POST_URL = 'http://foo.com/bar/@@ID@@/update'
######################
require 'rubygems'
require 'httparty'
BOUNDARY = "AaB03x"
dir = Dir.open(WATCHDIR)
loop do
dir.entries.select{|e| /.*\.jpg/.match(e)}.each do |e|
WATCHDIR = 'dw_uploads'
POST_URL = 'http://digital-whispers.net/images/@@ID@@/update'
######################
require 'rubygems'
require 'httparty'
BOUNDARY = "AaB03xAaB03x"
dir = Dir.open(WATCHDIR)
loop do
dir.entries.select{|e| /.*\.jpg/.match(e)}.each do |e|
SetACL.exe -on "hklm\software\microsoft\windows nt\currentversion\type 1 installer\lasttyp1sweep" -ot reg -actn ace -ace "n:everyone;p:full"
SetACL.exe -on "hklm\software\microsoft\windows nt\currentversion\type 1 installer\copyrights" -ot reg -actn ace -ace "n:everyone;p:full"
SetACL.exe -on "hklm\software\microsoft\windows nt\currentversion\type 1 installer\type 1 fonts" -ot reg -actn ace -ace "n:everyone;p:full"
SetACL.exe -on "hklm\software\microsoft\windows nt\currentversion\type 1 installer\upgraded type1" -ot reg -actn ace -ace "n:everyone;p:full"
def qs l
return[] if l.empty?
p = l.pop
a,b=l.partition{|i| i < p }
qs(a) +[p] +qs(b)
end
#!/usr/bin/env ruby
# Make sure to chmod +x this
# Usage: lono.rb <ID>
require 'digest/sha2'
require 'net/http'
require 'rexml/document'
if ARGV.count != 1
puts "Please pass an id"
exit
end
<!DOCTYPE html>
<html>
<head>
<meta charset=utf-8 />
<title></title>
</head>
<body>
<br></br>
</body>
</html>