Skip to content

Instantly share code, notes, and snippets.

View girliemac's full-sized avatar
📝
Working mostly on writing docs these days

Tomomi ❤ Imura girliemac

📝
Working mostly on writing docs these days
View GitHub Profile
@girliemac
girliemac / 0.txt
Last active September 1, 2016 14:47
[Blog] Creating a Chat App with Material Design using Polymer
This is a gist for my blog/tutorial, "Creating a Chat App with Material Design using Polymer"
@girliemac
girliemac / 01.txt
Created October 25, 2016 02:39
Snippets for my Medium Post: Creating a Slack Command Bot from Scratch with Node.js & Distribute It
command=/httpstatus
text=302
response_url=https://hooks.slack.com/commands/1234/5678 ...
[
{
"action": "talk",
"voiceName": "Chipmunk",
"text": "Pee, pee, ei, pee. I have a pen, I have an apple. Uh! Apple pen! I have a pen, I have pineapple. Uh! Pineapple pen!. Apple-Pen, Pineapple-Pen. Uh! Pen-Pineapple-Apple-Pen. Pen-Pineapple-Apple-Pen"
}
]
[
{
"action": "talk",
"voice_name": "Kendra",
"text": "Yo, you are listening to a text-to-speech call made with Nexmo's Voice API. Bye now."
}
]
@girliemac
girliemac / 01.py
Last active January 2, 2017 00:42
[Tut] Controlling Lights with Pulse Width Modulations
import RPi.GPIO as GPIO
import sys
GPIO.setmode(GPIO.BCM)
PIN_LIVING = 4
GPIO.setup(PIN_LIVING, GPIO.OUT)

Keybase proof

I hereby claim:

  • I am girliemac on github.
  • I am girlie_mac (https://keybase.io/girlie_mac) on keybase.
  • I have a public key ASAG2LRi_yJrII2IZXk3GT-hC11s4UuybUhqPUnG7XNB6Ao

To claim this, I am signing this object:

@girliemac
girliemac / dabblet.css
Created March 28, 2012 00:58
HTML5 and CSS3 "Hello My name is" Sticker
/**
* HTML5 and CSS3 "Hello My name is" Sticker
* by @girlie_mac
* Thank you @futomi and @thesifter, for correcting my original markup to make it in semantic html5, and @mikeleeorg, @kevinmarks and @dmitrykharlamov for suggesting me to use hCard microformat! I maybe still doing wrong with the vCard class names and semantics...
*
*/​
article, div {
box-sizing: border-box;
}
.vcard {
@girliemac
girliemac / geo.js
Last active October 14, 2017 03:44
Geohashing
var lat, lon;
if ('geolocation' in navigator) {
navigator.geolocation.getCurrentPosition(function(position) {
lat = position.coords.latitude;
lon = position.coords.longitude;
console.log('lat: ' + lat);
console.log('lon: ' + lon);
console.log('geohash: ' + geohash(lat, 0) + '' + geohash(lon, 0));
import sys
from pubnub import Pubnub
pubnub = Pubnub(publish_key='<your-pub-key>', subscribe_key='<your-sub-key>')
channel = 'hello-pi'
data = {
'username': 'Your name',
'message': 'Hello World from Pi!'
@girliemac
girliemac / cordova-1.html
Last active October 18, 2017 17:39
Snippets for blog, "Sending Android Push Notifications via GCM in JavaScript using PhoneGap and PubNub"
<script type="text/javascript" src="js/PushNotification.js"></script>
<script type="text/javascript" src="https://cdn.pubnub.com/pubnub-3.7.4.min.js"></script>