Skip to content

Instantly share code, notes, and snippets.

View dahngeek's full-sized avatar
🖥️
Working on PWAs

Daniel Xutuc dahngeek

🖥️
Working on PWAs
View GitHub Profile
@jimsynz
jimsynz / rgb_spectrum.c
Created January 5, 2011 20:59
Arduino sketch to cycle an RGB LED through the colour spectrum.
const int redPin = 11;
const int greenPin = 10;
const int bluePin = 9;
void setup() {
// Start off with the LED off.
setColourRgb(0,0,0);
}
void loop() {
@ivanmendoza
ivanmendoza / media-queries.css
Created May 12, 2012 07:24
Common media queries
/* SMARTPHONES */
@media only screen and (min-device-width : 320px) and (max-device-width : 480px) {
}
/* TABLETS */
@media screen and (min-width: 481px) and (max-width: 1024px) {
}
/* DESKTOP */
@thomcc
thomcc / 3d.rkt
Created October 2, 2012 03:45
3d racket drawing
#lang racket/gui
(require racket/flonum racket/fixnum)
;(require racket/require)
;(require (filtered-in
; (λ (name) (regexp-replace #rx"unsafe-" name ""))
; racket/unsafe/ops))
;(require (only-in racket/flonum flvector))
(define-syntax-rule (define-bin-op-stx name oper id)
@justindarc
justindarc / Fetch.sublime-settings
Created October 6, 2012 07:01
Sublime Text 2 - Fetch Settings
{
"files":
{
// jQuery
"jquery.js" : "http://code.jquery.com/jquery.js",
"jquery.min.js" : "http://code.jquery.com/jquery.min.js",
// jQuery Plugins
"jquery.cookie.js" : "https://raw.github.com/carhartl/jquery-cookie/master/jquery.cookie.js",
@ahmadnassri
ahmadnassri / installation.md
Last active March 4, 2019 19:04
Typical PHP/Nginx Setup on a Debian server

do everything as root

sudo su

update system:

apt-get update
@tonyg
tonyg / 2d.rkt
Last active April 8, 2024 03:41
Playing with OpenGL in Racket
#lang send-exp racket/gui
(require sgl/gl)
(require sgl/gl-vectors)
(require pict)
(define texture%
(class object%
(init [(initial-bitmap bitmap)])
(field [width 0]
anonymous
anonymous / download_apk.sh
Last active March 23, 2024 15:54
Bash script for pulling APK's from Non-rooted android devices
#!/bin/sh
if test $# -lt 1 ; then
echo "Usage: download_apk.sh <GooglePlayPackageName>"
exit 1
fi
PACKAGE=$1
APK_PATH=`adb shell pm list packages -f -3 | grep $PACKAGE | cut -d'=' -f 1 | cut -c9-`
echo "Pulling $APK_PATH from device"
echo `adb pull ${APK_PATH} ./${PACKAGE}.apk`
@justindarc
justindarc / enable_wifi_direct.sh
Last active September 4, 2018 20:08
enable_wifi_direct.sh
#!/bin/sh
adb shell "mount -o rw,remount /system"
adb shell "stop b2g"
adb shell "echo \"ro.moz.wifi.p2p_supported=1\" >> /system/build.prop"
adb shell "mount -o ro,remount /system"
adb reboot
/**
* A string builder with built-in support for ANSI escape sequences.
*
* @author Nathan Fiscaletti
*/
public class AnsiStringBuilder
{
/**
* Reset options.
*/