Skip to content

Instantly share code, notes, and snippets.

View wiless's full-sized avatar
💭
I may be slow to respond.

wireless wiless

💭
I may be slow to respond.
View GitHub Profile
@benjchristensen
benjchristensen / index.html
Created May 2, 2012 19:34
Simple Line Graph using SVG and d3.js
<html>
<head>
<title>Simple Line Graph using SVG and d3.js</title>
<script src="http://mbostock.github.com/d3/d3.v2.js"></script>
<style>
/* tell the SVG path to be a thin blue line without any area fill */
path {
stroke: steelblue;
stroke-width: 1;
fill: none;
@wiless
wiless / testplot.cpp
Last active December 18, 2015 02:29
KPlotWidget test code
#include <QApplication>
#include <QDialog>
#include <QHBoxLayout>
#include <KPlotWidget>
#include <KPlotObject>
#include <KPlotAxis>
#include <KPlotPoint>
#include <itpp/itbase.h>
int main(int argn,char *argc[])
@grafov
grafov / gist:5712165
Created June 5, 2013 07:22
golang sample of json/rpc over websocket
package main
import (
"code.google.com/p/go.net/websocket"
//"github.com/garyburd/go-websocket/websocket"
//"github.com/zhangpeihao/gowebsocket"
"net/http"
"net/rpc"
"net/rpc/jsonrpc"
)
@pklaus
pklaus / rpi-arch-linux-to-sdcard.sh
Last active February 6, 2020 01:09
for the Raspberry Pi 1, Zero, Zero W : Arch Linux ARM to SD Card Script; See https://gist.github.com/pklaus/9dd4a7bf040788cda501 for RPi 2
#!/bin/bash
# <http://archlinuxarm.org/platforms/armv6/raspberry-pi>
echo -e "\n\nArch Linux ARM for Raspberry Pi to SD Card"
echo -e "(Not meant for the Raspberry Pi 2 - "
echo -e " check https://gist.github.com/pklaus/9dd4a7bf040788cda501 instead.)\n\n"
if [[ $EUID -ne 0 ]]; then
echo "This script must be run as root" 1>&2
@joyrexus
joyrexus / README.md
Created February 23, 2015 22:11
boltdb demo
@wiless
wiless / sumall.go
Created March 15, 2015 13:51
Example walk through interface and reflect
package main
import (
"reflect"
"strconv"
"fmt"
)
func sum(arguments ...interface{}) {
@wiless
wiless / httpserver.go
Last active December 8, 2020 05:36
A Simple command line HTTP Server
package main
import (
"flag"
"fmt"
"html/template"
"io/ioutil"
"net"
"net/http"
"os"
@jamestalmage
jamestalmage / forward.md
Last active April 9, 2024 17:21
Using Firebase to Authenticate to Google Drive

Note: There is a lot of information here, but if I have provided a link, it is probably something you should click on and read. OAuth is a complex enough subject on it's own, and hacking these two services together only adds to it.

Even so, I have found Firebase's API to be simpler than almost any other OAuth solution I have explored. When all is said and done, the important bits of code related to authentication is actually less than 10 lines. If you have ever tried to implement your own OAuth flow before, you know how amazing that is.

In the end, it may be worth using Firebase for authentication, even if that's the ONLY thing you use it for.

@pklaus
pklaus / rpi2-arch-linux-to-sdcard.sh
Last active September 1, 2019 01:21
Raspberry Pi 2: Arch Linux ARM to SDcard Script. This is for the Rapsberry Pi 2. For the RPi 1, see https://gist.github.com/pklaus/b92dfc72136d1509c2ed
#!/bin/bash
# <http://archlinuxarm.org/platforms/armv7/broadcom/raspberry-pi-2>
echo -e "\n\nArch Linux ARM to SD Card"
echo -e "for the Raspberry Pi 2"
echo -e "(and for the Raspberry Pi 3, if you don't need to use the unofficial arm64 variant)\n\n"
if [[ $EUID -ne 0 ]]; then
echo "This script must be run as root" 1>&2
@husobee
husobee / main.go
Created December 22, 2015 02:16
simple golang http middleware chaining example
package main
import (
"fmt"
"net/http"
"time"
"golang.org/x/net/context"
"github.com/husobee/backdrop"