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 python2 | |
# Quick and dirty demonstration of CVE-2014-0160 by Jared Stafford (jspenguin@jspenguin.org) | |
# The author disclaims copyright to this source code. | |
import sys | |
import struct | |
import socket | |
import time | |
import select |
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
var jq = document.createElement('script'); | |
jq.src = "http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"; | |
document.getElementsByTagName('head')[0].appendChild(jq); | |
// ... give time for script to load, then type. | |
jQuery.noConflict(); | |
// get average age from this table: http://www.tdcj.state.tx.us/death_row/dr_executed_offenders.html | |
var ages = [], | |
sum = 0; | |
jQuery('tr').each(function(a,b) { |
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
70:29909 | |
164:25977 | |
89:3707 | |
305:30594 | |
470:33812 | |
203:5441 | |
189:26191 | |
190:9729 | |
191:1808 | |
61:23969 |
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
# Role to delete: viewer | |
# get role | |
role = Role.find_by_name('viewer') | |
# get user | |
user = User.find_by_email('foo@example.com') | |
# delete role by looping through role assignments | |
user.role_assignments.each do |ra| |
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
Verifying that +barce is my Bitcoin username. You can send me #bitcoin here: https://onename.io/barce |
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
/** | |
* Retrieves all the rows in the active spreadsheet that contain data and logs the | |
* values for each row. | |
* For more information on using the Spreadsheet API, see | |
* https://developers.google.com/apps-script/service_spreadsheet | |
*/ | |
function readRows() { | |
var sheet = SpreadsheetApp.getActiveSheet(); | |
var rows = sheet.getDataRange(); | |
var numRows = rows.getNumRows(); |
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
# config/locales/en.yml | |
en: | |
exception: | |
show: | |
not_found: | |
title: "Not Found" | |
description: "The page you were looking for does not exists." | |
internal_server_error: | |
title: "Internal Server Error" |
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
function fibonacci(n) { | |
return n<2?n:fibonacci(n-1)+fibonacci(n-2); | |
} | |
var fibonacciSeries = function(fibonacciLimit) { | |
var result = Array(); | |
var currentFibonacciValue = fibonacci(0); | |
var i = 1; | |
while (currentFibonacciValue < fibonacciLimit) { | |
result.push(currentFibonacciValue); |
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 'faraday' | |
conn = Faraday.new(:url => 'https://www.google.com') do |faraday| | |
faraday.request :url_encoded # form-encode POST params | |
faraday.response :logger # log requests to STDOUT | |
faraday.adapter Faraday.default_adapter # make requests with Net::HTTP | |
end | |
response = conn.get '/' |
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 'rest_client' | |
require 'json' | |
# RestClient.log=STDOUT # Optionally turn on logging | |
q = '{ | |
"query" : { "term" : { "user" : "kimchy" } } | |
} | |
' | |
r = JSON.parse \ |
OlderNewer