Skip to content

Instantly share code, notes, and snippets.

View amberj's full-sized avatar

Amber Jain amberj

View GitHub Profile
@kisom
kisom / gist:3522220
Created August 30, 2012 04:07
The Yeelong: A Review

I'm sure many other people have reviewed the Lemote Yeelong 8089 netbook. I picked up mine for a specific use-case and for the most part, it does a decent enough job satisfying that use case. However, unless you're at an RMS level of free software dogmatism, you would probably be better served by an x86-based netbook. I use it for hacking in C on the bus, especially when working on code that is meant to run on OpenBSD systems. It is quite slow, making it sometimes painful to do much more than gvim (which can take a second or longer to pull up on screen)

Mine is configured with 1G of RAM and a 160G hard drive (I haven't looked at changing out any of the stock hardware), and runs OpenBSD 5.0/mipsel. For the most part, the hardware runs very well. The major exception is the wireless card; when I tried using it on an open access point, it worked fine. It struggled, and typically failed, to connect to my WPA2'd access point. I had a USB ral0 wireless adaptor lying around, and I just use that when I need wireless

@wizardishungry
wizardishungry / Gemfile
Last active February 12, 2018 18:49
Vagrant snippet to set VirtualBox guest CPU count to the number of host cores on Linux or OS X (broken 2018)
gem 'concurrent'
// Includes functions for exporting active sheet or all sheets as JSON object (also Python object syntax compatible).
// Tweak the makePrettyJSON_ function to customize what kind of JSON to export.
var FORMAT_ONELINE = 'One-line';
var FORMAT_MULTILINE = 'Multi-line';
var FORMAT_PRETTY = 'Pretty';
var LANGUAGE_JS = 'JavaScript';
var LANGUAGE_PYTHON = 'Python';
@pamelafox
pamelafox / countryinfo.py
Last active February 13, 2024 00:57
Python list of country codes, names, continents, capitals, and pytz timezones
countries = [
{'timezones': ['Europe/Andorra'], 'code': 'AD', 'continent': 'Europe', 'name': 'Andorra', 'capital': 'Andorra la Vella'},
{'timezones': ['Asia/Kabul'], 'code': 'AF', 'continent': 'Asia', 'name': 'Afghanistan', 'capital': 'Kabul'},
{'timezones': ['America/Antigua'], 'code': 'AG', 'continent': 'North America', 'name': 'Antigua and Barbuda', 'capital': "St. John's"},
{'timezones': ['Europe/Tirane'], 'code': 'AL', 'continent': 'Europe', 'name': 'Albania', 'capital': 'Tirana'},
{'timezones': ['Asia/Yerevan'], 'code': 'AM', 'continent': 'Asia', 'name': 'Armenia', 'capital': 'Yerevan'},
{'timezones': ['Africa/Luanda'], 'code': 'AO', 'continent': 'Africa', 'name': 'Angola', 'capital': 'Luanda'},
{'timezones': ['America/Argentina/Buenos_Aires', 'America/Argentina/Cordoba', 'America/Argentina/Jujuy', 'America/Argentina/Tucuman', 'America/Argentina/Catamarca', 'America/Argentina/La_Rioja', 'America/Argentina/San_Juan', 'America/Argentina/Mendoza', 'America/Argentina/Rio_Gallegos', 'America/Argentina/Ushuai
@mikeyk
mikeyk / redis_session_backend.py
Created April 8, 2011 18:01
A redis backend for Django Sessions, tested on Django 1.3+
from django.contrib.sessions.backends.base import SessionBase, CreateError
from django.conf import settings
from django.utils.encoding import force_unicode
import redis
class SessionStore(SessionBase):
""" Redis store for sessions"""
def __init__(self, session_key=None):
self.redis = redis.Redis(
@hugs
hugs / selenium-examples.py
Created February 16, 2011 19:40
Example code for using the Selenium 2 Python bindings.
# To install the Python client library:
# pip install -U selenium
# Import the Selenium 2 namespace (aka "webdriver")
from selenium import webdriver
# iPhone
driver = webdriver.Remote(browser_name="iphone", command_executor='http://172.24.101.36:3001/hub')
# Android
@jpinnix
jpinnix / gist:547977
Created August 24, 2010 17:55
Help nginx+passenger serve static index pages
# Help nginx+passenger serve static index pages
# Site specific config
server {
listen 80;
server_name domain.com;
index index.html;
access_log logs/appname.access.log;
error_log logs/appname.error.log;
@defunkt
defunkt / clients.md
Created April 18, 2010 14:09
A list of Gist clients.

Gist Clients

Want to create a Gist from your editor, the command line, or the Services menu? Here's how.

Editor Support