Skip to content

Instantly share code, notes, and snippets.

View sekmet's full-sized avatar
📡
If you are going to TRY, go ALL the WAY!

Carlos Guimaraes sekmet

📡
If you are going to TRY, go ALL the WAY!
View GitHub Profile
@sekmet
sekmet / designer.html
Last active August 29, 2015 14:19
designer
<link rel="import" href="../core-scaffold/core-scaffold.html">
<link rel="import" href="../core-header-panel/core-header-panel.html">
<link rel="import" href="../core-menu/core-menu.html">
<link rel="import" href="../core-item/core-item.html">
<link rel="import" href="../core-icon-button/core-icon-button.html">
<link rel="import" href="../core-toolbar/core-toolbar.html">
<link rel="import" href="../core-input/core-input.html">
<link rel="import" href="../speech-mic/speech-mic.html">
<link rel="import" href="../core-menu/core-submenu.html">
@sekmet
sekmet / gist:15fba00c429a515afea8
Created April 24, 2015 20:03
onCreateUser.coffee - better google integration
Accounts.onCreateUser (options, user)->
if options.profile
user.profile = options.profile
else
user.profile = {}
if user.services.google
user.emails = [{address: user.services.google.email, verified: true}]
user.profile.firstName = user.services.google.given_name
user.profile.lastName = user.services.google.family_name
user.profile.photo = user.services.google.picture
@sekmet
sekmet / countries.json
Created October 11, 2015 13:33 — forked from keeguon/countries.json
A list of countries in JSON
[
{name: 'Afghanistan', code: 'AF'},
{name: 'Åland Islands', code: 'AX'},
{name: 'Albania', code: 'AL'},
{name: 'Algeria', code: 'DZ'},
{name: 'American Samoa', code: 'AS'},
{name: 'AndorrA', code: 'AD'},
{name: 'Angola', code: 'AO'},
{name: 'Anguilla', code: 'AI'},
{name: 'Antarctica', code: 'AQ'},
#!/bin/bash
# Assumes a pre-built carina cluster, e.g.:
#
# carina create --wait shipyard \
# && carina credentials shipyard \
# && eval `carina env shipyard`
#
proxy_redirect off;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
client_body_buffer_size 128k;
proxy_connect_timeout 90;
proxy_send_timeout 90;
proxy_read_timeout 90;
proxy_buffers 32 4k;
fastcgi_param QUERY_STRING $query_string;
fastcgi_param REQUEST_METHOD $request_method;
fastcgi_param CONTENT_TYPE $content_type;
fastcgi_param CONTENT_LENGTH $content_length;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param SCRIPT_NAME $fastcgi_script_name;
fastcgi_param PATH_INFO $fastcgi_path_info;
fastcgi_param REQUEST_URI $request_uri;
fastcgi_param DOCUMENT_URI $document_uri;
user www-data www-data;
pid /var/run/nginx.pid;
worker_processes 1;
worker_rlimit_nofile 100000;
events {
worker_connections 4096;
include /etc/nginx.custom.events.d/*.conf;
}
@sekmet
sekmet / gist:912e2071ddcf96c64e3d
Created January 28, 2016 09:20
Delete everything in a MongoDB database
use <whichever database>
db.getCollectionNames().forEach(function(c) { if (c.indexOf("system.") == -1) db[c].drop(); })
@sekmet
sekmet / google_speech2text.md
Created March 7, 2016 21:12 — forked from alotaiba/google_speech2text.md
Google Speech To Text API

Google Speech To Text API

Base URL: https://www.google.com/speech-api/v1/recognize
It accepts POST requests with voice file encoded in FLAC format, and query parameters for control.

Query Parameters

client
The client's name you're connecting from. For spoofing purposes, let's use chromium

lang
Speech language, for example, ar-QA for Qatari Arabic, or en-US for U.S. English