Skip to content

Instantly share code, notes, and snippets.

View ygbr's full-sized avatar
🛰️
Inventing the State of Art

Ygor Lemos ygbr

🛰️
Inventing the State of Art
View GitHub Profile
@slzatz
slzatz / umqtt.py
Created April 16, 2016 19:57
This is an mqtt subscribe client for micropython
# Copyright (c) 2012-2014 Roger Light <roger@atchoo.org>
#
# This is a stripped down version of paho.mqtt intended for micropython
# All rights reserved. This program and the accompanying materials
# are made available under the terms of the Eclipse Public License v1.0
# and Eclipse Distribution License v1.0 which accompany this distribution.
#
# The Eclipse Public License is available at
# http://www.eclipse.org/legal/epl-v10.html
# and the Eclipse Distribution License is available at
@gavinhungry
gavinhungry / nginx-tls.conf
Last active March 11, 2024 14:51
Nginx SSL/TLS configuration for "A+" Qualys SSL Labs rating
#
# Name: nginx-tls.conf
# Auth: Gavin Lloyd <gavinhungry@gmail.com>
# Desc: Nginx SSL/TLS configuration for "A+" Qualys SSL Labs rating
#
# Enables HTTP/2, PFS, HSTS and OCSP stapling. Configuration options not related
# to SSL/TLS are not included here.
#
# Additional tips:
#
@ColtonProvias
ColtonProvias / gist:5079405
Created March 4, 2013 02:05
S3 uploader for Python 3
"""
S3 Uploader for Python 3
Colton J. Provias
Usage:
f = open('sample.png', 'rb')
contents = f.read()
response, url = upload_to_s3('AWSKEY', 'AWSSECRET', 'mybucket', 'image.png', contents, 'image/png')
"""
@gbaldera
gbaldera / app.js
Created May 21, 2012 19:40 — forked from pec1985/app.js
Easy SplitView controller - iPad, Titanium
var SplitView = require('splitview');
/**
* SplitView Public Methods:
*
* split.initWithMasterAndDetailWindows( Ti.UI.Window, Ti.UI.Window );
* split.openInMaster( Ti.UI.Window )
* split.openInDetail( Ti.UI.Window )
@balupton
balupton / README.md
Last active April 20, 2022 13:21
Ajaxify a Website with the HTML5 History API using History.js, jQuery and ScrollTo
@dawsontoth
dawsontoth / app.js
Created March 4, 2011 00:44
Customize the look of the tab bar in iOS Appcelerator Titanium
Ti.include('overrideTabs.js');
/*
This is a typical new project -- a tab group with three tabs.
*/
var tabGroup = Ti.UI.createTabGroup();
/*
Tab 1.
@dawsontoth
dawsontoth / InfiniteScrollableView.js
Created February 3, 2011 20:54
Infinite scrollable list.
/**
* We're going to create an infinite scrollable list. In this case, we're going to show a date. When you swipe left,
* you'll see yesterday. Then the day before yesterday, and so on. Swiping right shows you tomorrow, and so on.
*/
var win = Ti.UI.createWindow({ backgroundColor: '#fff' });
var isAndroid = Ti.Platform.osname === 'android';
/**
* Track where we are in the infinite scrollable views, and define how large of a step goes between each view.
*/
var currentDate = new Date(), msIntervalBetweenViews = 1000/*ms*/ * 60/*s*/ * 60/*m*/ * 24/*h*/;
# How to echobot with XMPP, BOSH, and Strophe
1. Setup ejabberd(http://www.ejabberd.im/) server and setup account admin@localhost.local
NOTE: localhost should be enough. If you setup something else, make sure you add it at /etc/hosts like this
#/etc/hosts
127.0.0.1 localhost.local
NOTE: Also download Psi(http://psi-im.org/), and make sure you can connect to your ejabberd server.
2. Download strophe(http://code.stanziq.com/strophe/) and place it (eg: /Users/makoto/work/sample/strophejs-1.0)