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
$ adb shell | |
$ cd data/data/com.android.providers.settings/databases | |
$ sqlite3 settings.db | |
sqlite> .tables | |
sqlite> select * from secure; | |
sqlite> INSERT INTO secure (name, value) VALUES ('device_provisioned', 1); | |
sqlite> .exit |
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/php5 | |
<?php | |
class AUpdater { | |
private $cookies; | |
private $credentials = array( | |
'username' => '...', | |
'password' => '...', | |
'mysubmit' => 'Sign+In' | |
); |
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
### IPdetect configuration file | |
### (c) Mariusz Kaczmarczyk, 2005+ | |
### Content of this file is subject to GPL version 2 license | |
### (http://www.gnu.org/licenses/gpl.html). | |
### This is shell include file, use rules for shell script files. | |
### Values should be VARIABLE='value' (no spaces around equal sign!). | |
### See 'man 1 bash' for details on how to write shell scripts. | |
# Force PATH to this value. For security reasons, do not change unless you |
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
import Skype4Py | |
from time import sleep | |
skype = Skype4Py.Skype() | |
TRYING = 1 | |
TEXT = { | |
'QUESTION':"Hello. It's antispam bot. Answer, 2+2=? One figure, please. You have %i trying." % (TRYING), | |
'ANSWER':"4", | |
'WIN':"Right. I'll write you soon.", | |
'AGAIN':"Try one more time.", | |
'FAIL':"Autoignoring.", |
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
@echo off | |
setlocal EnableExtensions EnableDelayedExpansion | |
pushd %~dp0 | |
rem set_7_usb_boot.cmd v0.02 | |
rem created by cdob | |
echo prepare offline windows 7 registry, set USB boot drivers &echo. | |
set System_Root=\Windows | |
if not %1.==. set System_Root=%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
#!/usr/bin/env ruby | |
filename = ARGV[0] | |
str = File.read filename | |
blocks = str.split('<%').map{|s| s.empty? ? s : s.split('%>') }.flatten | |
inside = false | |
blocks.map do |block| | |
if inside | |
block.gsub! '\\', '\\\\\\\\' | |
block.gsub! '"', '\"' | |
block.gsub! '#{', '#" %><%= "{" + "' |
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 Base64ImageWrapper < StringIO | |
def initialize(data, name=nil) | |
@name = name || 'image' | |
@blob = Base64.decode64(data) | |
super @blob | |
end | |
def original_filename | |
"#@name.#{content_type.split('/').last}" |
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
module Arel::Visitors | |
class ToSql | |
alias :visit_Fixnum :quoted | |
alias :visit_Bignum :quoted | |
end | |
end | |
module ActiveRecord::ConnectionAdapters | |
class PostgreSQLAdapter | |
module FixNumberToStringComparison |
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
f = File.open('/tmp/tr', 'w') | |
set_trace_func proc { | |
|event, file, line, id, binding, classname| | |
if event == "call" or event == "return" | |
f.printf "%8s %s:%-2d %10s %8s\n", event, file, line, id, classname | |
end | |
} |
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
require 'timeout' | |
Timeout.timeout(0.5) do | |
begin | |
sleep 1 | |
rescue Exception => ex | |
puts ex.inspect | |
puts 'ಠ_ಠ' | |
end | |
end |
OlderNewer