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
const log = new Proxy({}, {
get: (_, colour) => function() {
console.log(`%c ${[].slice.call(arguments).join(' ')}`, `color: ${colour}`)
}
})
// example
log.tomato('I am tomato')
log.chocolate('I am chocolate')
log.cornflowerblue('I am cornflowerblue')
@dahngeek
dahngeek / 0_reuse_code.js
Last active August 29, 2015 14:27
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@dahngeek
dahngeek / rgb_spectrum.c
Last active August 29, 2015 14:27 — forked from jimsynz/rgb_spectrum.c
Arduino sketch to cycle an RGB LED through the colour spectrum.
const int redPin = 8;
const int greenPin = 9;
const int bluePin = 10;
#define LDR 0
void setup() {
// Start off with the LED off.
setColourRgb(0,0,0);
Serial.begin(9600);
unsigned int rgbColour[3];
@dahngeek
dahngeek / dabblet.css
Created August 29, 2014 02:46 — forked from anonymous/dabblet.css
The first commented line is your dabblet’s title
/**
* The first commented line is your dabblet’s title
*/
background: #f06;
background: linear-gradient(45deg, #f06, yellow);
min-height: 100%;
@dahngeek
dahngeek / index.html
Created October 8, 2012 00:51 — forked from anonymous/index.html
Custom radio buttons using CSS + CSS only changing backgrounds
<input checked data-tooltip='r' class='test1' name='test' type='radio' />
<input class='test2' data-tooltip='g' name='test' type='radio' />
<input class='test3' data-tooltip='b' name='test' type='radio' />
<div></div>
@dahngeek
dahngeek / media-queries.css
Created July 6, 2012 04:34 — forked from ivanmendoza/media-queries.css
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 */