Skip to content

Instantly share code, notes, and snippets.

@bgreenlee
bgreenlee / multipart_binary_posts.js
Created September 17, 2011 00:07
Multipart Binary POSTs in Javascript #javascript
var dataURL = this.canvas.toDataURL(this.getImageType()); // grab the snapshot as base64
var imgData = atob(dataURL.substring(13 + this.getImageType().length)); // convert to binary
var filenameTimestamp = (new Date().getTime());
var separator = "----------12345-multipart-boundary-" + filenameTimestamp;
// Javascript munges binary data when it undergoes string operations (such as concatenation), so we need
// to jump through a bunch of hoops with streams to make sure that doesn't happen
// create a string input stream with the form preamble
@fengmk2
fengmk2 / WeiboUtil.js
Created February 16, 2012 12:11
新浪微博mid与url互转实用工具
/**
* 新浪微博mid与url互转实用工具
* 作者: XiNGRZ (http://weibo.com/xingrz)
*/
var WeiboUtil = {
// 62进制字典
str62keys: [
"0", "1", "2", "3", "4", "5", "6", "7", "8", "9",
"a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z",
// ==UserScript==
// @name DMMono
// @include chrome://browser/content/browser.xul
// @version 1.0.0
// @description Enable DMM mono access
// ==/UserScript==
var responseObserver = {
observe: function(subject, topic, data)
{
@zoellner
zoellner / grideye.ino
Last active September 23, 2017 12:22
Grideye demo for Grid-EYE Evaluation Unit with COM-00759 RG LED Array (8x8). based on http://pewa.panasonic.com/assets/pcsd/manuals/grid-eye/grid-eye-arduino-code-examples.pdf . corrected errors in original code. Now using SPI library and serial output of data
#include <Wire.h>
#include <SPI.h>
//define our colors for LED Array
#define GREEN 0x01
#define RED 0x02
#define ORANGE 0x03
//define the SPI pins for the LED Array
#define SLAVESELECT 10//ss
char ledArray [64];
byte pixelTempL;
@berlysia
berlysia / gist:11b66f6e54bf43472406
Created August 23, 2014 21:16
imas_ml idolStats
{
"1": {
"id": 1,
"name": "はじまりの朝 天海春香",
"img": "http://m.ip.bn765.com/11006f0a05d58d133f",
"rarity": "HR",
"region": "Vo",
"ap": 3600,
"dp": 3600,
"skillName": "日々前進!",
@arms22
arms22 / grid_eye_view.ino
Last active January 9, 2019 21:52
GridEyeサンプル2 - Arduino
#include <Wire.h>
#include <GridEye.h>
GridEye myeye;
void setup(void)
{
// I2Cバスに参加
Wire.begin();
// フレームレートを10に設定
@skypenguins
skypenguins / minor_songs_of_idolmaster.md
Last active January 21, 2023 16:40
アイマスの非売品&入手困難・不可&マイナーな曲やCD一覧

【アイマスの非売品&入手困難・不可&マイナーな曲やCD一覧】

CD

765

  • 入手困難なCDとしてやたらと有名である。
@kmaehashi
kmaehashi / README.md
Created February 19, 2017 08:43
アニメソングの歌詞ならここにおまかせ?データセット
@amarao
amarao / blame-praise.py
Last active May 3, 2024 15:54
Example of argparse with subparsers for python
#!/usr/bin/env python
import argparse
def main(command_line=None):
parser = argparse.ArgumentParser('Blame Praise app')
parser.add_argument(
'--debug',
action='store_true',
help='Print debug info'
@morcefaster
morcefaster / pros_are_nice.md
Last active January 22, 2024 14:59
Did anyone say drama?

Preface

Hello everyone. With Ceb drama getting so much traction, I decided to do what any rational person would do in this situation - download all public matches of all professional dota 2 players and then scan the all-chat for any racism or naughty naughty words, so the j͇͕͙ͣu͒͆s̼̠͍̖̮̳ͮ̃t̫̙̯͎ͬ̇̊̄iͨć̼͓ͬͨ͑ͣe͉̜̫̱̠̘̋̒ͅ can be upheld once and for all.

There are several nuances that stood in my way.

  1. Many professionals' pubs are kept private.
  2. Most of the trashtalk happens in ally chat, which isn't saved.
  3. Some of the trashtalk happens over mic... which again, isn't saved.
  4. Some of the trashtalk happens on smurf accounts, which I did not include here.