Skip to content

Instantly share code, notes, and snippets.

View shrayasr's full-sized avatar

Shrayas Rajagopal shrayasr

View GitHub Profile
@siddharthkp
siddharthkp / reactivconf-2017-proposal.md
Last active February 25, 2024 10:06
Building applications for the next billion users
@tweekmonster
tweekmonster / AutoIndent_Demo.scpt
Created February 24, 2016 18:04
Script for creating the autoindent GIF for braceless.vim
-- Script for creating the autoindent GIF for braceless.vim
-- https://github.com/tweekmonster/braceless.vim
to slowType(someText)
tell application "System Events"
repeat with i from 1 to count characters of someText
keystroke (character i of someText)
delay 0.15
end repeat
end tell
@bretcope
bretcope / 1 - Map Arguments to Properties.cs
Last active March 12, 2019 05:33
Sigil Object Mapping - Basic Examples
// Runnable from Linqpad 5
// Must install the Sigil nuget package and include the Sigil namespace
void Main()
{
var createSample = GetMapperDelegate();
// try it out
createSample(23, "Hello").Dump();
}
@NickCraver
NickCraver / Windows10-Setup.ps1
Last active April 1, 2024 10:52
(In Progress) PowerShell Script I use to customize my machines in the same way for privacy, search, UI, etc.
##################
# Privacy Settings
##################
# Privacy: Let apps use my advertising ID: Disable
Set-ItemProperty -Path HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\AdvertisingInfo -Name Enabled -Type DWord -Value 0
# To Restore:
#Set-ItemProperty -Path HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\AdvertisingInfo -Name Enabled -Type DWord -Value 1
# Privacy: SmartScreen Filter for Store Apps: Disable
Set-ItemProperty -Path HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\AppHost -Name EnableWebContentEvaluation -Type DWord -Value 0
@kracekumar
kracekumar / method_type.py
Created November 30, 2014 18:23
Inject method
In [4]: class Foo(object):
...: def __init__(self, func=None):
...: if func:
...: # Better validation is required
...: self.execute = types.MethodType(func, self)
...: def execute(self):
...: print "Normal"
...:
In [5]: def execute(self):
@sgaurav
sgaurav / gist:d8aa7850fcdaf3319711
Created October 29, 2014 07:24
Javascript method to detect browser without using UA String
var isOpera = !!window.opera || navigator.userAgent.indexOf(' OPR/') >= 0;
var isFirefox = typeof InstallTrigger !== 'undefined';
var isSafari = Object.prototype.toString.call(window.HTMLElement).indexOf('Constructor') > 0;
var isChrome = !!window.chrome && !this.isOpera;
var isIE = false || !!document.documentMode;
@Foxboron
Foxboron / hylang-source
Last active November 27, 2016 20:00
Hylang sources
Lightning talk on PyCon 2013:
http://www.youtube.com/watch?feature=player_detailpage&v=1vui-LupKJI#t=975
Boston Python Meetup (January 2013)
http://www.youtube.com/watch?v=ulekCWvDFVI
PyCon Canada 2013
http://www.youtube.com/watch?v=n8i2f6X0SkU
PyCon France 2013
@kjlubick
kjlubick / InstallingMeld
Last active November 2, 2023 02:49
How to install Meld on Windows and getting it set up with Git
After installing it http://sourceforge.net/projects/meld-installer/
I had to tell git where it was:
git config --global merge.tool meld
git config --global diff.tool meld
git config --global mergetool.meld.path “C:\Program Files (x86)\Meld\meld\meld.exe”
And that seems to work. Both merging and diffing with “git difftool” or “git mergetool”
@nibrahim
nibrahim / calligraphy.txt
Last active August 29, 2015 14:01
Calligraphy tools
Fountain pens:
- Sheaffer calligraphy set
- Parker calligraphy set
Nib holders
- Speedball
- Cretacolour
Nibs
- Speedball
#!/usr/bin/env python
# Quick and dirty demonstration of CVE-2014-0160 by
# Jared Stafford (jspenguin@jspenguin.org)
# Modified so that it finds cookies
import sys
import struct
import socket
import time
import select