Skip to content

Instantly share code, notes, and snippets.

package main
import "fmt"
func main() {
s1 := &FakeStruct1{}
runMethods(s1)
s2 := &FakeStruct2{}
runMethods(s2)
s3 := &FakeStruct3{}
➜ ~ % /Applications/Gqrx.app/Contents/MacOS/gqrx
Controlport disabled
No user supplied config file. Using "default.conf"
gr-osmosdr bbb97873 (0.1.5git) gnuradio 3.7.11
built-in source types: file fcd rtl rtl_tcp hackrf rfspace airspy airspyhf soapy redpitaya
FM demod gain: 3.05577
Resampling audio 96000 -> 48000
IQ DCR alpha: 1.04166e-05
PortAudio V19.6.0-devel, revision 396fe4b6699ae929d3a685b3ef8a7e97396139a4 (version 1246720)
Number of audio devices: 2
grammar Test;
root: expr EOF;
expr:
expr OR expr
| expr XOR expr
| expr AND expr
| INT
;
class MyClass
myFunc = (cb) ->
cb()
myOtherFunc = ->
#do domething
obj = new MyClass()
obj.myFunc ->
obj.myOtherFunc
var NativeModule;
(function(){
process.moduleLoadList.push = function() {
NativeModule = arguments.callee.caller('native_module');
delete process.moduleLoadList.push;
return Array.prototype.push.apply(process.moduleLoadList, arguments);
}
require('vm');
irb(main):001:0> require 'htmlentities'
=> true
irb(main):002:0> code = HTMLEntities.new
=> #<HTMLEntities:0x007f8e2d9d6f80 @flavor="xhtml1">
irb(main):003:0> code.decode("\u0026quot;").gsub(/"/, '')
=> ""
@jrozner
jrozner / gist:4710467
Created February 4, 2013 22:49
lol business people
<script id="mulu">
var tag = document.createElement('iframe');
tag.src = 'http://mulu.me/mini/f13725704e2101306b7122000a1e81a6';
tag.height = '1400';
tag.width = '650';
tag.setAttribute('frameborder', '0');
tag.scrolling = 'no';
var sibling = document.querySelector('#mulu');
document.querySelector('body').insertBefore(tag, sibling);
sibling.remove();
msf = BeEF::Extension::Metasploit::RpcClient.instance
if msf.login
msf_module_config = {}
path = BeEF::Core::Configuration.instance.get('beef.extension.metasploit.path')
if not BeEF::Core::Console::CommandLine.parse[:resetdb] and File.exists?("#{path}msf-exploits.cache")
print_debug "Attempting to use Metasploit exploits cache file"
raw = File.read("#{path}msf-exploits.cache")
begin
msf_module_config = YAML.load(raw)
rescue => e
NoMethodError: undefined method `key?' for #<JSON::Ext::Generator::State:0x000000c183cf40> from /home/ec2-user/.rbenv/versions/ruby-1.9.3-p326/lib/ruby/gems/1.9.1/gems/activesupport-3.2.11/lib/active_support/core_ext/object/try.rb:36:in `try' from /home/ec2-user/.rbenv/versions/ruby-1.9.3-p326/lib/ruby/gems/1.9.1/gems/activemodel-3.2.11/lib/active_model/serializers/json.rb:91:in `as_json' from /home/ec2-user/.rbenv/versions/ruby-1.9.3-p326/lib/ruby/gems/1.9.1/gems/activesupport-3.2.11/lib/active_support/json/encoding.rb:47:in `block in encode' from /home/ec2-user/.rbenv/versions/ruby-1.9.3-p326/lib/ruby/gems/1.9.1/gems/activesupport-3.2.11/lib/active_support/json/encoding.rb:77:in `check_for_circular_references' from /home/ec2-user/.rbenv/versions/ruby-1.9.3-p326/lib/ruby/gems/1.9.1/gems/activesupport-3.2.11/lib/active_support/json/encoding.rb:46:in `encode' from /home/ec2-user/.rbenv/versions/ruby-1.9.3-p326/lib/ruby/gems/1.9.1/gems/activesupport-3.2.11/lib/active_su
var request = require('request')
, list = []
, results = {}
, counter = list.length;
list.forEach(function(v, i) {
request.get({url: 'https://graph.facebook.com/'+v, json: true}, function(err, response, body) {
if (err) {
results[i] = 'error';
counter--;