Skip to content

Instantly share code, notes, and snippets.

Ankit Solanki Anks

View GitHub Profile
@Anks
Anks / insert-clipboard.applescript
Created Nov 9, 2017
Applescript to 'type' your clipboard into textfields (useful for websites where they block paste)
View insert-clipboard.applescript
on run
tell application "System Events"
keystroke (the clipboard)
end tell
end run
@Anks
Anks / codeasdata.fs
Created Nov 7, 2016
Code As Data in F#
View codeasdata.fs
(* Type definitions *)
// A list of functions that take the current context (TDS return),
// and return true if the column is supposed to be visible right now
type IsColumnVisible = (TdsReturn -> bool) list
// List of functions that take a data row (generic type 'T)
// and return true if the current column is supposed to be editable
type IsColumnEditable<'T> = ('T -> bool) list
@Anks
Anks / setup-org.el
Created Mar 30, 2016
org-mode setup
View setup-org.el
;;; Directory / File setup
(setq org-directory "~/Dropbox/org")
(setq org-default-notes-file "~/Dropbox/org/notes.org")
(setq org-archive-location "~/Dropbox/org/.archive")
(setq org-agenda-files (list org-directory))
;;; Configure org-capture
(setq org-capture-templates
'(("t" "Todo" entry (file+headline "~/Dropbox/org/notes.org" "Tasks")
"* TODO %?\n %i\n SCHEDULED %t")
@Anks
Anks / ip.txt
Created Oct 21, 2014
Bad ISP IP Addresses
View ip.txt
# Block these IPs at a firewall level
# MTNL Delhi uses this IP to inject their popup "ads" on some non HTTPS requests
203.94.243.40
View keybase.md

Keybase proof

I hereby claim:

  • I am anks on github.
  • I am anks (https://keybase.io/anks) on keybase.
  • I have a public key whose fingerprint is 19FF 2958 B7FA CC10 CE4D 79D4 A144 4AC9 C3AC C9F7

To claim this, I am signing this object:

@Anks
Anks / deft-title-fn-strip-file-vars.el
Created Sep 9, 2014
deft-mode – Strip file variables from title line
View deft-title-fn-strip-file-vars.el

;; Customise deft to remove file-vars from the title line. ;; ;; I use ‘markdown-mode with deft usually, but for some longform files, ;; I prefer using ‘org-mode. ;; ;; The easiest way to do this is to use a file variable like so: ;; ;; -*- mode: org; -*- ;; ;; in the first line of the file. This makes the file open in ‘org-mode

@Anks
Anks / d3-number-transition.html
Last active Dec 25, 2015
Transitioning numbers using d3.js
View d3-number-transition.html
<!DOCTYPE html>
<meta charset="utf-8">
<style></style>
<body>
<h2>Transitioning numbers</h2>
<h3 data-value="0" id="the-number">0</h3>
<input type="number" value="0" id="new-number" step="100" />
@Anks
Anks / package.json
Created Aug 20, 2012
Easy local development with a node.js proxy
View package.json
{
"name": "your-app-name",
"version": "0.0.1",
"private": true,
"dependencies": {
"http-proxy": "0.8.x",
"connect": "2.3.x"
}
}
@Anks
Anks / nthloop.logo.pde.java
Created Aug 13, 2012
nth loop logo processing sketch
View nthloop.logo.pde.java
color[] colors = { color(85, 98, 112), color(78, 205, 196),
color(199, 244, 100), color(255, 107, 107),
color(196, 77, 88)
};
float rot = 0;
int colorIndex = 0;
void setup() {
frameRate(26);
size(325, 200, P3D);
@Anks
Anks / flipkart-flyte-high-quality-downloads.js
Created Mar 4, 2012
Change download bitrate to 320kbps on Flipkart
View flipkart-flyte-high-quality-downloads.js
$('select.bit-rate').each(function() { $(this).find('option:first').attr('selected', 'selected'); });
You can’t perform that action at this time.