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
root@artemis:~# curl -d "client_id={ID}.apps.googleusercontent.com&scope=https://www.googleapis.com/auth/calendar" https://accounts.google.com/o/oauth2/device/code | |
{ | |
"device_code" : {DEVICE_CODE}, | |
"user_code" : {USER_CODE}, | |
"verification_url" : "http://www.google.com/device", | |
"expires_in" : 1800, | |
"interval" : 5 | |
} | |
root@artemis:~#curl -d "client_id={ID}.apps.googleusercontent.com&client_secret={SECRET}&code={DEVICE_CODE}&grant_type=http://oauth.net/grant_type/device/1.0" https://accounts.google.com/o/oauth2/token |
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
DROP TABLE IF EXISTS `articles`; | |
CREATE TABLE `articles` ( | |
`alias` VARCHAR(64) NOT NULL, | |
`author` TEXT NOT NULL, | |
`title` TEXT NOT NULL, | |
`intro` TEXT NOT NULL, | |
`body` TEXT NOT NULL, | |
`date` DATE NOT NULL, | |
PRIMARY KEY (`alias`) |
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 python | |
import sys | |
import timing | |
from pprint import pprint | |
''' | |
Recurse elements in passed in string. | |
''' |
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" | |
"fmt" | |
"net/http" | |
"os" | |
"time" | |
) |
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
import random | |
from copy import deepcopy | |
class Piece: | |
def __init__(self, display, stuck = False): | |
self.display = display | |
self.stuck = stuck | |
# 4 x 4 | |
self.height = len(display) | |
self.width = len(display[0]) |
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
ff |
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
__precompile__() | |
module Molcajete | |
import Requests: get, post, put, delete, options, json | |
global base_url = "https://api.meetup.com/" | |
if !haskey(ENV, "MEETUP_API_TOKEN") | |
error("MEETUP_API_TOKEN environment variable is required.") |
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
[push] | |
default = current | |
[user] | |
name = Cristina Munoz | |
email = [email protected] | |
[core] | |
editor = /usr/local/bin/vim | |
pager = less |
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
from http.server import HTTPServer, BaseHTTPRequestHandler | |
import re | |
HOST, PORT = "localhost", 4000 | |
INPUTS = {} | |
class HashHandler(BaseHTTPRequestHandler): | |
# assuming the challenge refers to HTTP GET requests | |
def do_GET(self): | |
regex = r"/(set|get)\?(\w+)=(\w+)" |
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
let buttons = `<button type="button" class="btn btn-warning lessFields"><span class="glyphicon glyphicon-minus"></span></button> | |
<button type="button" class="btn moreFields"><span class="glyphicon glyphicon-plus"></span></button>`; | |
prefillFields(); | |
$(".moreFields").click(function() { | |
console.log("on click moreFields"); | |
// TODO: refactor to permit more than 10 filters | |
var step = parseInt($(".moreFields").parent().get(0).id.slice(-1)[0]); | |
addNewField(step + 1); | |
this.remove(); |
OlderNewer