Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@csik
csik / .PICO_DRUMS.md
Last active January 11, 2022 18:54 — forked from jhw/.PICO_DRUMS.md
Parse Pico Drums packs

download

justin@justin-XPS-13-9360:~/work$ python download.py 
Default
Complex Waveforms
DJ Raitis Vinyl Cuts
IB Magnetic Saturation
Richard Devine
Nero Bellum
@csik
csik / gdrive_dl.py
Last active November 4, 2020 05:11
Download Large Files from Google Drive
from pydrive.auth import GoogleAuth
from pydrive.drive import GoogleDrive
"""API calls to download a very large google drive file. The drive API only allows downloading to ram
(unlike, say, the Requests library's streaming option) so the files has to be partially downloaded
and chunked. Authentication requires a google api key, and a local download of client_secrets.json
Thanks to Radek for the key functions: http://stackoverflow.com/questions/27617258/memoryerror-how-to-download-large-file-via-google-drive-sdk-using-python
"""
@csik
csik / gist:090b404408cb6b8d1a62
Last active May 16, 2018 00:41
Freeswitch_Install
#!/bin/bash
# FreeSWITCH Installation script for CentOS 5.5/5.6
# and Debian based distros (Debian 5.0 , Ubuntu 10.04 and above)
# Copyright (c) 2011 Plivo Team. See LICENSE for details.
FS_CONF_PATH=https://github.com/plivo/plivoframework/raw/master/freeswitch
FS_GIT_REPO=https://stash.freeswitch.org/scm/fs/freeswitch.git
FS_INSTALLED_PATH=/usr/local/freeswitch
@csik
csik / gist:651e35ecfbbcddcbd9f9
Created February 24, 2016 12:42
A quick way to randomly change your mac address (os x) -- great for airports.
sudo ifconfig en0 ether $(openssl rand -hex 6 | sed 's/\(..\)/\1:/g; s/.$//')
from jnius import autoclass
from time import sleep
MediaPlayer = autoclass('android.media.MediaPlayer')
ones = MediaPlayer()
ones.setDataSource("/sdcard/Music/05 Steve Miller Band Fly Like An Eagle Remix.mp3")
ones.prepare()
twos = MediaPlayer()
@csik
csik / gist:4988995
Created February 19, 2013 19:25
Ultrabasic code for reading a geiger counter
import serial
#to use the serial library, you need to have pyserial installed, otherwise it won't find the serial library
ser = serial.Serial('/dev/tty.usbserial-A9014NPA',9600)
#Above we create a new serial object
the_time = 0
counter = 0
while(1):
@csik
csik / textbelt.py
Created November 14, 2014 22:30
IP addresses are limited to 75 texts per day. Phone numbers are limited to 3 texts every 3 minutes. To report abuse or request increased limits, please contact ianw_textbelt at ianww.com.
"""IP addresses are limited to 75 texts per day.
Phone numbers are limited to 3 texts every 3 minutes.
To report abuse or request increased limits, please contact
ianw_textbelt at ianww.com."""
import httplib, urllib
def send_text(numstring, message):
params = urllib.urlencode({'number': numstring, 'message': message})
headers = {"Content-type": "application/x-www-form-urlencoded", "Accept": "text/plain"}