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 logging | |
import ( | |
"io" | |
"os" | |
// import your DB here | |
"github.com/mypkg/main/database" | |
"github.com/rs/zerolog" | |
"github.com/rs/zerolog/log" |
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 FirestoreCollection from './FirestoreCollection' | |
import Activity from './Activity' | |
export default class Activities extends FirestoreCollection { | |
model () { | |
return Activity | |
} | |
routes () { | |
return { |
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
<template> | |
<v-layout> | |
<v-flex xs12> | |
<v-card> | |
<v-toolbar flat> | |
<!-- Today Button --> | |
<v-tooltip bottom> | |
<v-btn slot="activator" | |
flat | |
color="primary" |
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
#define ST_CHAR 0xFE | |
#define ESC_CHAR 0xFD | |
#define MSG_LEN 6 | |
unsigned char rxCounter = 0, escaped = 0, in_msg = 0, rxBuffer[MSG_LEN]; | |
void parseSerialMsg(void) { | |
static unsigned char byte, status; | |
if (DataRdyUSART()) { |
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
module Freebase | |
require 'rest-client' | |
NS = 'http://rdf.freebase.com/ns' | |
API_URL = 'https://www.googleapis.com/freebase/v1' | |
API_KEY = 'your_key_here' | |
RestClient.proxy = ENV['http_proxy'] | |
MQLClient = RestClient::Resource.new(API_URL) |
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
var Freebase = { | |
api: 'https://www.googleapis.com/freebase/v1', | |
key: '?key=' + 'your_key_here', | |
// Main image (icon) of a topic | |
img: function(mid) { | |
return this.api + '/image' + mid + this.key; | |
}, | |
// MQL query with callback on success |
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
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> | |
<html xmlns="http://www.w3.org/1999/xhtml" style="font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; box-sizing: border-box; font-size: 14px; margin: 0;"> | |
<head> | |
<meta name="viewport" content="width=device-width" /> | |
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> | |
<title>Actionable emails e.g. reset password</title> | |
<style type="text/css"> | |
img { |
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 requests | |
import logging | |
from jinja2 import Template | |
template = None | |
html = None | |
URL = "https://api.mailgun.net/v3/sandbox4a7ba08a09ec40b4a668b550607547a8.mailgun.org/messages" | |
KEY = "key-ed60f4288cb8b9c15d876ad2ae06c545" |
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 sys | |
import urllib2 | |
import re | |
# LESS source file | |
FA_LESS_URL = 'https://raw.githubusercontent.com/FortAwesome/Font-Awesome/master/less/variables.less' | |
# REGEX | |
re_less_var = re.compile('.*:\s*"(.*)";') | |
re_fa_var = re.compile('^@fa-var-(.*):\s*"\\\\(.*)";') |
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/python | |
import SimpleHTTPServer | |
import SocketServer | |
from urlparse import urlparse, parse_qs | |
import cgi | |
import logging | |
from datetime import datetime | |
PORT = 8000 |
NewerOlder