This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /usr/bin/env bash | |
function usage { | |
echo "Usage: godroid [...command]" | |
echo " build build -target android ." | |
echo " install install -r *.apk" | |
echo " run run Activity" | |
echo " logcat filter by tag GoLog since now()" | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"image" | |
"azul3d.org/gfx.v1" | |
"azul3d.org/gfx/window.v2" | |
"azul3d.org/keyboard.v1" | |
"azul3d.org/lmath.v1" | |
"azul3d.org/mouse.v1" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"fmt" | |
"math" | |
"os" | |
"sort" | |
"strings" | |
) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"bufio" | |
"encoding/json" | |
"flag" | |
"fmt" | |
"github.com/gorilla/mux" | |
"log" | |
"net/http" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"archive/tar" | |
"compress/bzip2" | |
"flag" | |
"io" | |
"io/ioutil" | |
"log" | |
"net/http" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Usage of droidscale: | |
-interp="Lanzcos3": interpolation to use. NearestNeighbor, Bilinear, Bicubic, MitchellNetravali, Lanzcos2, Lanzcos3. | |
-out="./out": directory to place resized images. | |
-path="": path of xhdpi drawables to process, can point to a single file. | |
Resizes xhdpi resources for ldpi, mdpi, and hdpi. Contents of flag path will | |
be walked and new files written to flag out will be flattened. This means | |
you can organize the contents of flag path with subdirectories to target | |
different interpolations for use on a particular set of images. For example: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /usr/bin/gawk -f | |
BEGIN { | |
IGNORECASE = 1 # gawkism | |
print "begin transaction;" | |
} | |
{ | |
gsub("\r$", "") # dos2unix | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <stdlib.h> | |
typedef int (*oper_cb)(int a, int b); | |
int add(int a, int b) | |
{ | |
return a + b; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <stdlib.h> | |
// | |
typedef struct Duck Duck; | |
typedef void (*quack_t)(void *self); | |
void Duck_quack(void *self); | |
// Overriding original structure members means you must include everything up. | |
// So if I want to override `quack`, I dont need to override anything |