Skip to content

Instantly share code, notes, and snippets.

View Aeron's full-sized avatar
🚀

Eugene Glybin Aeron

🚀
View GitHub Profile
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>SoundCloud OAuth 2 User Agent Authentication Flow Demo</title>
<script type="text/javascript" charset="utf-8" src="javascript/jquery-1.4.2.js"></script>
<script type="text/javascript" charset="utf-8">
$(function () {
var extractToken = function(hash) {
@didip
didip / tornado_cookie_secret_generator.py
Created February 12, 2011 17:20
Generates secure cookie secret for Tornado Web Framework
@nephics
nephics / client.py
Created August 9, 2011 19:33
Test of experimental Tornado feature for a streaming request body handler
#
# Test of experimental Tornado feature for a streaming request body handler, see
# https://github.com/nephics/tornado/commit/1bd964488926aac9ef6b52170d5bec76b36df8a6
#
#
# Client sending file to server
#
import tornado.httpclient as httpclient
@koblas
koblas / smtp.py
Created November 11, 2011 15:23
SMTP Client for Tornado
from tornado import ioloop
from tornado import iostream
import socket
class Envelope(object):
def __init__(self, sender, rcpt, body, callback):
self.sender = sender
self.rcpt = rcpt[:]
self.body = body
self.callback = callback
@ayang
ayang / app.py
Created February 4, 2012 03:47
Tornado session manager use redis
class Application(tornado.web.Application):
def __init__(self):
tornado.web.Application.__init__(self, handlers, **settings)
self.db_session = db_session
self.redis = redis.StrictRedis()
self.session_store = RedisSessionStore(self.redis)
class BaseHandler(tornado.web.RequestHandler):
@stevenharman
stevenharman / gist:2910960
Created June 11, 2012 16:16
Pivotal Tracker Activity Web Hook: event_type values
story_create
add_story_label
story_label_add
remove_story_label
story_label_remove
comment_create
comment_delete
story_move_multi
multi_story_delete
story_delete_multi
@paulgibbs
paulgibbs / html5-notifications.md
Created June 12, 2012 14:04
OS X Notification Center in Safari 5.2

OS X Notification Center in Safari 5.2

OS X Mountain Lion adds Notification Center for managing alerts. Just like growl, but better.

Safari 5.2 exposes HTML5 notifications API to sites. Every site need to have permission for showing notifications.

Specification is very new and completely different from older version Chrome has. Developer doesn't have to watch for complicated NotificationCenter.

The syntax is very simple:

@padde
padde / openvpn.md
Last active April 30, 2018 17:11
OpenVPN on Ubuntu 12.10 at DigitalOcean

OpenVPN on Ubuntu 12.10 at DigitalOcean

Install OpenVPN

sudo apt-get install openvpn

Generate Server Certificates

sudo cp -r /usr/share/doc/openvpn/examples/easy-rsa/2.0 /etc/openvpn/easy-rsa2

cd /etc/openvpn/easy-rsa2

@jonahoffline
jonahoffline / screenshots_iCloud.md
Created September 1, 2014 19:39
Save screenshots to iCloud Folder (OSX)

Change your default screenshots location (desktop)

defaults write com.apple.screencapture location folder_name_here

Example

Save screenshots to the 'Screenshots' folder (inside iCloud Drive)

defaults write com.apple.screencapture location ~/Library/Mobile\ Documents/com~apple~CloudDocs/Screenshots

# Basic Strongswan ikev2 server setup
* paltform: atlantic.net ubuntu 14.04 x64
* the commands below are run with root account
## Strongswan
```
apt-get install strongswan
apt-get install iptables iptables-persistent
```