Skip to content

Instantly share code, notes, and snippets.

View ozgurodabasi's full-sized avatar
:octocat:

Özgür Odabaşı ozgurodabasi

:octocat:
  • istanbul
View GitHub Profile
@ju-popov
ju-popov / timestamp.py
Last active April 7, 2021 16:09
Python DateTime / Timestamp Convertion
######################################################################
# CURRENT AWARE LOCAL DATETIME
######################################################################
from datetime import datetime
from tzlocal import get_localzone
local_tz = get_localzone()
local_dt = datetime.now(local_tz)
var extend = require("xtend")
function Element(elem) {
return extend(ever(elem), {
hide: hidden.bind(null, elem)
, classes: classes.bind(null, elem)
, delegate: delegate.bind(null, elem)
})
}
@Chris2048
Chris2048 / flask sse
Last active September 19, 2024 12:31
Server-Side Events in flask
#!/bin/python2.7
# -`*- coding: utf-8 -*-
"""
test for Server-Side events in flask
inspiration from:
http://www.html5rocks.com/en/tutorials/eventsource/basics/
https://github.com/niwibe/sse.git
https://github.com/niwibe/django-sse.git
@alotaiba
alotaiba / google_speech2text.md
Created February 3, 2012 13:20
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

@saetia
saetia / gist:1623487
Last active June 4, 2025 08:26
Clean Install – OS X 10.11 El Capitan

OS X Preferences


most of these require logout/restart to take effect

# Enable character repeat on keydown
defaults write -g ApplePressAndHoldEnabled -bool false

# Set a shorter Delay until key repeat