Skip to content

Instantly share code, notes, and snippets.

View prafulfillment's full-sized avatar
🐶
Speaking to 🐶 & 🐬

praful mathur prafulfillment

🐶
Speaking to 🐶 & 🐬
View GitHub Profile

Keybase proof

I hereby claim:

  • I am prafulfillment on github.
  • I am prafulfillment (https://keybase.io/prafulfillment) on keybase.
  • I have a public key ASBDD1Fo2QByZm6qxr7-VAaEhxpuveA9B3tdbUUuC-LAggo

To claim this, I am signing this object:

Keybase proof

I hereby claim:

To claim this, I am signing this object:

set filePath to (path to desktop as text) & "screencast.mov"
tell application "QuickTime Player"
activate
set tdoc to new screen recording --> document "Screen Recording"
delay 1
tell application "System Events" to key code 49
delay 2
repeat while exists tdoc
@prafulfillment
prafulfillment / code-style.js
Created December 3, 2014 04:43
Replace Github code block css with the style Slack uses. (Use TamperMonkey on Chrome or GreaseMonkey on Firefox)
// ==UserScript==
// @name Replace Github code style
// @namespace https://www.derivatived.com/
// @version 0.1
// @description Remove all Pulse stories from LinkedIn news feed
// @match https://github.com/*
// @copyright 2014, Praful Mathur
// ==/UserScript==
function addGlobalStyle(css) {
/*
Autosend Invites to anyone that shares X number of connections with you.
Way to use this script:
1. Save it as a bookmarklet
2. Go to 'People you may know'
3. Click on this bookmarklet.
4. Enter number of overlapping connections
5. Check your console
@prafulfillment
prafulfillment / delete-fb-apps.js
Created April 14, 2014 16:25
Delete all your FB Apps from your Privacy view -- Hackish
function confirmDialog(){
document.getElementsByName('delete_app_actions')[0].click()
document.getElementsByName('ok')[0].click()
setTimeout(deleteApp,3000);
}
function deleteApp(){
document.getElementsByClassName('uiCloseButton')[0].click()
setTimeout(confirmDialog,1000);
}
var five = require("johnny-five"),
board, servo;
board = new five.Board();
board.on("ready", function() {
servos = {
acceleration: new five.Servo({
pin: 9,
range: [0, 180], // Default: 0-180
import serial
ser = serial.Serial('<USB tty>', 9600)
"""
`Forward` is constant 85 to `Acceleration Servo` value
`Backward` is constant 103 to `Acceleration Servo` value
`Stop` is constant 90 to `Acceleration Servo` value
Before moving `Forward` or `Backward`, the `Acceleration Servo` is `Stop`ped for 1 second
@prafulfillment
prafulfillment / kickstarter_project_stats.py
Created August 20, 2013 15:08
We're getting the stats from kickstarter projects.
# coding: utf-8
import requests
from bs4 import BeautifulSoup
from pprint import pprint as pp
from re import sub
def get_project(url):
r = requests.get(url)
kickstarter_html = r.text
soup = BeautifulSoup(kickstarter_html)
@prafulfillment
prafulfillment / startup_vagrant.bash
Created April 23, 2013 20:44
My startup file when I launch vagrant.
curl -O http://python-distribute.org/distribute_setup.py
sudo python distribute_setup.py
sudo easy_install pip
sudo pip install virtualenv
sudo pip install virtualenvwrapper
sudo apt-get install vim git-core subversion
cat > ~/.bashrc <<DELIM
# virtualenv
export WORKON_HOME=$HOME/.virtualenvs