Skip to content

Instantly share code, notes, and snippets.

View rohansingh's full-sized avatar

Rohan Singh rohansingh

View GitHub Profile
@rohansingh
rohansingh / ConfigurationProperty.snippet.xml
Created November 30, 2011 21:02
ConfigProperty snippet for C#
<?xml version="1.0" encoding="utf-8"?>
<CodeSnippets xmlns="http://schemas.microsoft.com/VisualStudio/2005/CodeSnippet">
<CodeSnippet Format="1.0.0">
<Header>
<Shortcut>propc</Shortcut>
<Title>propc</Title>
<Author>Rohan Singh</Author>
<Description>
Code snippet for a configuration-backed property
</Description>
@rohansingh
rohansingh / test.js
Created December 16, 2011 19:00
Titanium scratchpad
// this sets the background color of the master UIView (when there are no windows/tab groups on it)
Titanium.UI.setBackgroundColor('#000');
// create tab group
var tabGroup = Titanium.UI.createTabGroup();
//
// create base UI tab and root window
//
@rohansingh
rohansingh / syslog
Created April 8, 2014 14:08
Kernel panic (docker + 3.13)
[16314069.877834] BUG: unable to handle kernel paging request at ffffc900029fdb58
[16314069.877857] IP: [<ffffffffa0289200>] nf_nat_cleanup_conntrack+0x40/0x70 [nf_nat]
[16314069.877870] PGD 1b6426067 PUD 1b6427067 PMD 1019e5067 PTE 0
[16314069.877879] Oops: 0002 [#1] SMP
[16314069.877886] Modules linked in: nf_conntrack_netlink nfnetlink veth xt_addrtype xt_conntrack xt_CHECKSUM iptable_mangle ipt_MASQUERADE iptable_nat nf_nat_ipv4 nf_nat xt_tcpudp iptable_filter ip_tables x_tables nfsd auth_rpcgss nfs_acl aufs nfs lockd sunrpc bridge fscache 8021q garp stp mrp llc intel_rapl crct10dif_pclmul crc32_pclmul ghash_clmulni_intel aesni_intel aes_x86_64 lrw gf128mul glue_helper ablk_helper cryptd nf_conntrack_ipv4 nf_defrag_ipv4 nf_conntrack xen_kbdfront xen_fbfront syscopyarea sysfillrect sysimgblt fb_sys_fops raid456 async_raid6_recov async_memcpy async_pq async_xor async_tx xor raid6_pq [last unloaded: ipmi_devintf]
[16314069.877968] CPU: 2 PID: 97 Comm: kworker/u16:1 Not tainted 3.13.0-18-generic #38-Ubuntu
[

Keybase proof

I hereby claim:

  • I am rohansingh on github.
  • I am rohansingh (https://keybase.io/rohansingh) on keybase.
  • I have a public key whose fingerprint is 317C 842B 569A 10AF 9640 F3D7 FC09 345C 755C 13BC

To claim this, I am signing this object:

@rohansingh
rohansingh / README.md
Last active August 29, 2015 14:04
Debian/Upstart files for a Java service

This is an example for adding native Upstart support to the Debian package for a Java service.

The default and upstart files should both be placed in your debian packaging directory, giving you a final tree that looks something like:

+ debian/
  - control
  - default
 - upstart
@rohansingh
rohansingh / rollout.md
Created June 25, 2015 16:56
helios rollout

rollout command

The helios rollout command rolls out a new version of a job to a set of hosts. This involves:

  1. Determining the list and sequence of hosts to deploy to.

  2. Undeploying any prior versions of the same job from a host before deploying the new version.

  3. Deploying the new version of the job to each host sequentially, and waiting for the job to reach a RUNNING state before continuing.

@rohansingh
rohansingh / kubectl.log
Last active January 27, 2016 09:47
Fun with Kube jobs
$ kubectl get job rohan-job-bozus -o yaml
apiVersion: extensions/v1beta1
kind: Job
metadata:
creationTimestamp: 2016-01-26T13:56:04Z
generateName: rohan-job-
labels:
random: blahblahblah
name: rohan-job-bozus
namespace: default
@rohansingh
rohansingh / manifest.json
Last active April 18, 2018 04:16
esp32-idf framework def for platformio
{
"framework-espidf": [
{
"url": "https://github.com/rohansingh/esp-idf/archive/v3.0.0-rc1-pio-1.zip",
"version": "3.0.0-rc1",
"system": "*",
"sha1": "5da85a8f765e50eac0e270d3676b299adbc065a2"
}
]
}
@rohansingh
rohansingh / keybase.md
Created September 30, 2018 21:32
keybase.md

Keybase proof

I hereby claim:

  • I am rohansingh on github.
  • I am rohansingh (https://keybase.io/rohansingh) on keybase.
  • I have a public key ASC33zqpSrBU8uu-Q14CulkgoJO1zho2eb3H9uTIUkUbMwo

To claim this, I am signing this object:

@rohansingh
rohansingh / example.bzl
Created December 6, 2018 16:10
Rebuilding native modules for Linux
package_node_modules_cmd = """
mkdir -p "$@"
cp -pRL "external/npm/node_modules" "$(@D)"
"""
rebuild_node_modules_cmd = """
NPM="$$(pwd)/$(location @nodejs//:bin/npm)"
(
cd "$(@D)"