Skip to content

Instantly share code, notes, and snippets.

@doylecnn
doylecnn / diff.sh
Created April 11, 2014 06:19
windows 上 cygwin 下使用 git difftool 配合beyound compare 3 要用到的辅助脚本
# !/bin/sh
# diff is called by git difftool with 2 parameters:
# old-file-path new-file-path
# config in .gitconfig:
# [diff]
# tool = mybc3
# [difftool]
# prompt = false
# [difftool "mybc3"]
# cmd = /cygdrive/c/WINDOWS/diff.sh \"$LOCAL\" \"$REMOTE\"
@doylecnn
doylecnn / gmailCheck.go
Last active August 29, 2015 14:08
check gmail
package main
import (
"flag"
"fmt"
"log"
"net/http"
"strings"
"code.google.com/p/goauth2/oauth"
// http://play.golang.org/p/cvSYnYce0I
package main
import "fmt"
import "os"
func main() {
perm, err := PermFromString("0777")
if err != nil {
panic(err)
@doylecnn
doylecnn / test.c
Last active September 9, 2015 19:56
tiny demo to understand double star pointer
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
int main(int argc, char** argv){
for(int i=0;i<argc;i++){
printf("%s ",argv[i]);
}
printf("\n");
@doylecnn
doylecnn / cjson.test.c
Created September 10, 2015 13:00
cjosn test
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <inttypes.h>
#include "cJSON.h"
char* parseUint32(uint32_t num){
char b[30];
int len = sprintf(b, "%u", num);
@doylecnn
doylecnn / gist:45f68095226947a76d48
Created January 14, 2015 04:26
timeout demo with problem……
package main
import (
"fmt"
"math/rand"
"sync"
"time"
)
const (
package main
import (
"crypto/md5"
"flag"
"fmt"
"io"
"io/ioutil"
"log"
"math"
@doylecnn
doylecnn / soitecmoniter.js
Last active June 27, 2017 10:52
soitec web ui change
// ==UserScript==
// @name soitec date change
// @namespace http://tampermonkey.net/
// @version 0.1
// @description try to take over the world!
// @author You
// @match https://secoaa.soitec.net/Monitoring
// @grant none
// @include https://secoaa.soitec.net/Monitoring*
// ==/UserScript==
@doylecnn
doylecnn / README.md
Created October 6, 2018 23:57 — forked from joyrexus/README.md
Functional config in go

Quick demo of how to initialize your data structure with optional configuration parameters ... with sane defaults if left unspecified.

This functional config technique ...

  • lets you write APIs that can evolve without pain
  • provides meaningful configuration parameters
  • makes it easy to set default settings
  • makes it possible to set complex conditional values

Easy Amiibo Emulation - https://bit.ly/2z0m09k

(^ that's a short-link to this page, so you can open it in Linux)

(Windows|Linux PC) + JoyControl + Bluetooth = AMIIBO EMULATION

Overview

This guide shows you how to use joycontrol to emulate Amiibos. You only need a Linux PC (or a Windows|MacOS running a Linux VM) and a Bluetooth adapter.