Skip to content

Instantly share code, notes, and snippets.

View sunny-g's full-sized avatar

Sunny Gonnabathula sunny-g

View GitHub Profile
@eduardocereto
eduardocereto / .vimrc
Created July 11, 2012 07:02
.vimrc optimized for Python and Javascript
" ==========================================================
" Vundle
" ==========================================================
set nocompatible
filetype off
set rtp+=~/.vim/bundle/vundle/
call vundle#rc()
" let Vundle manage Vundle
@proudlygeek
proudlygeek / client_cors.js
Created July 17, 2012 20:48
JSONP Vs. CORS
// http://jsfiddle.net/suBPQ/
$.ajax({
url: "http://api_test_server.proudlygeek.c9.io/",
success: function(data) {
console.log(data);
}
});
@thefinn93
thefinn93 / README.md
Created July 22, 2012 20:21
CJDNS Admin GUI

CJDNS Admin GUI

Allows access to the CJDNS Admin API via a GUI. Should be kept in a private, password protected location.

Dependencies

13:25 deberg: [17:21:57] hey, i just saw your question.
13:25 eiki: [17:22:17] great - any ideas?
13:25 deberg: [17:22:19] the thing to use is futures.
13:25 eiki: [17:22:36] what's the difference?
13:25 eiki: [17:22:45] and do you know of any sample code?
13:25 deberg: [17:23:02] yeah, one place to look is the meteor HTTP package.
13:25 deberg: [17:23:11] packages/http/httpcall_server.js:64
13:25 deberg: [17:23:39] this is the basic pattern for wrapping a node callback.
13:25 eiki: [17:24:09] https://github.com/meteor/meteor/blob/master/packages/http/httpcall_server.js#L65
13:25 deberg: [17:24:35] you want to declare a new future, call future.return() inside the callback, and block the outer caller (your method) with future.wait().
@gburd
gburd / async_nif.h
Last active October 3, 2023 05:12
Technique for running Erlang NIFs functions asynchronously, not on scheduler threads.
/*
* async_nif: An async thread-pool layer for Erlang's NIF API
*
* Copyright (c) 2012 Basho Technologies, Inc. All Rights Reserved.
* Author: Gregory Burd <[email protected]> <[email protected]>
*
* This file is provided to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance with the License.
* You may obtain a copy of the License at:
*
@0xjjpa
0xjjpa / chrome.md
Created December 9, 2012 04:37
Understanding Google Chrome Extensions

#Introduction

Developing Chrome Extensions is REALLY fun if you are a Front End engineer. If you, however, struggle with visualizing the architecture of an application, then developing a Chrome Extension is going to bite your butt multiple times due the amount of excessive components the extension works with. Here are some pointers in how to start, what problems I encounter and how to avoid them.

Note: I'm not covering chrome package apps, which although similar, work in a different way. I also won't cover the page options api neither the new brand event pages. What I explain covers most basic chrome applications and should be enough to get you started.

Table of Contents

  1. Understand the Chrome Architecture
  2. Understand the Tabs-Extension Relationship
  3. Picking the right interface for the job
@rxin
rxin / ramdisk.sh
Last active November 21, 2024 15:11
ramdisk create/delete on Mac OS X.
#!/bin/bash
# From http://tech.serbinn.net/2010/shell-script-to-create-ramdisk-on-mac-os-x/
#
ARGS=2
E_BADARGS=99
if [ $# -ne $ARGS ] # correct number of arguments to the script;
then
@gavinandresen
gavinandresen / TwoFactorWallet.md
Last active September 2, 2023 13:18
Yubikey/Google Authenticator protected Bitcoin Wallets

Thumbnail sketch: Two-factor (Yubikey or Google Authenticator) protected wallets

Hardware:

Computer. Shared-secret authenticator (Yubikey/Google Authenticator/etc). Server (possibly shared with millions of other users).

Motivating use case setup:

User creates a split (2-of-2 multisig) wallet on the computer and server. Keys must be securely backed up to protect against loss. GUI to be determined, but there will be some type of "Use Authenticator" checkbox specified at setup.

@arcanis
arcanis / configure.txt
Created June 29, 2013 00:28
LLVM emscripting
--enable-optimized
--disable-polly
--disable-clang-arcmt
--disable-clang-static-analyzer
--disable-clang-rewriter
--disable-assertions
--disable-debug-symbols
--disable-jit
--disable-docs
--disable-threads
@dirkk0
dirkk0 / doit.sh
Created July 9, 2013 13:55
Install pump.io on Amazon EC2
sudo apt-get update
# get ec2 ip and hostname
curl http://169.254.169.254/latest/meta-data/public-ipv4 > public.ip
curl http://169.254.169.254/latest/meta-data/public-hostname > public.hostname
sudo apt-get install --yes build-essential curl git
#install latest node
sudo apt-get install --yes python-software-properties python g++ make
sudo add-apt-repository --yes ppa:chris-lea/node.js
sudo apt-get update