This file contains 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
<link rel="import" href="../../bower_components/polymer/polymer.html"> | |
<!-- | |
Plays audio files. | |
Example: | |
<audio-player></audio-player> | |
@demo |
This file contains 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
IAB_CATEGORIES = { | |
"IAB1":"Arts & Entertainment", | |
"IAB1-1":"Books & Literature", | |
"IAB1-2":"Celebrity Fan/Gossip", | |
"IAB1-3":"Fine Art", | |
"IAB1-4":"Humor", | |
"IAB1-5":"Movies", | |
"IAB1-6":"Music", | |
"IAB1-7":"Television", | |
"IAB2":"Automotive", |
This file contains 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 <math.h> | |
int myPin = 0; | |
int touching = false; | |
int touchingCount = 0; | |
void setup() { | |
Serial.begin(9600); | |
} |
This file contains 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
outline = [{ | |
id: 1, | |
children: [{ | |
id: 3, | |
label: 'goodbye', | |
children: [] | |
}], | |
label: 'hello' | |
}, | |
{ |
This file contains 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
# This works becuase tagless images look like this: | |
# | |
# REPOSITORY TAG IMAGE ID CREATED SIZE | |
# <none> <none> 39c3774dd2fb 10 minutes ago 417 MB | |
docker rmi $(docker images -a | grep none) |
This file contains 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
# always list date and size info | |
alias ll='ls -all' | |
# make sure you are on a protected branch and prome remote and local where no remote exists | |
alias gitclean='git checkout development; git branch | egrep -v "master|development" | xargs git branch -D' | |
# list all branch and remote branches | |
alias gitlist='git branch -a' |
This file contains 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
const BASE_URL = "https://api.pitchbook.com" | |
const TOKEN = "TOKEN HERE" | |
$.ajaxSetup({ | |
headers: { 'authorization': TOKEN } | |
}); | |
const generalSearch = function(name) { | |
var def = jQuery.Deferred(); |
This file contains 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
import sha1 from "sha1"; | |
import axios from "axios"; | |
const BREECH_TOLERENCE = 100; | |
isBreeched = password => { | |
const pwSha1 = sha1(password).toUpperCase(); | |
const salt = pwSha1.slice(0, 5); | |
const pepper = pwSha1.slice(5); | |
return axios | |
.get(`https://api.pwnedpasswords.com/range/${salt}`) |
This file contains 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
import json | |
import requests | |
from django.views.decorators.csrf import csrf_exempt | |
FB_MESSENGER_ACCESS_TOKEN = "[TOKEN]" | |
def respond_FB(sender_id, text): | |
json_data = { | |
"recipient": {"id": sender_id}, |
This file contains 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
var ABSOLUTE_URI = "http://yourpage.com/openerhandler.html"; | |
var FB_ID = "123456778"; | |
function openFBLoginDialogManually(){ | |
// Open your auth window containing FB auth page | |
// with forward URL to your Opened Window handler page (below) | |
var redirect_uri = "&redirect_uri=" + ABSOLUTE_URI + "fbjscomplete"; | |
var scope = "&scope=public_profile,email,user_friends"; | |
var url = "https://www.facebook.com/dialog/oauth?client_id=" + FB_ID + redirect_uri + scope; |