Skip to content

Instantly share code, notes, and snippets.

View benmcnelly's full-sized avatar
🎯
Focusing

Ben McNelly benmcnelly

🎯
Focusing
View GitHub Profile
@jeffreycastro
jeffreycastro / heroku_pg_to_sqlite3.txt
Last active September 12, 2022 13:18
Import Heroku Postgres to SQLite3 in your local Rails
### Disclaimer,
- datetime is not copied with the timezone difference. seems like the dates are saved in UTC so there will be difference with the datetime columns
---
in this guide,
postgres username = "jep"
postgres password = "jepjep"
@apollo13
apollo13 / chromelogger.py
Last active May 12, 2022 01:09
Django logging to Firefox/Chrome devtools
"""
License: MIT - https://opensource.org/licenses/MIT
ChromeLogger is a protocol which allows sending logging messages to the Browser.
This module implements simple support for Django. It consists of two components:
* `LoggingMiddleware` which is responsible for sending all log messages
associated with the request to the browser.
* `ChromeLoggerHandler` a python logging handler which collects all messages.
@bishboria
bishboria / springer-free-maths-books.md
Last active June 8, 2024 06:39
Springer made a bunch of books available for free, these were the direct links
@aurman
aurman / enpointExample.groovy
Created March 27, 2014 17:33
SmartThings API Endpoint Example
/**
* App Endpoint API Access Example
*
* Author: SmartThings
*/
preferences {
section("Allow Endpoint to Control These Things...") {
input "switches", "capability.switch", title: "Which Switches?", multiple: true
input "locks", "capability.lock", title: "Which Locks?", multiple: true
@jefftriplett
jefftriplett / tor.py
Last active May 22, 2023 09:10
Python Requests + Tor (Socks5)
"""
setup:
pip install requests
pip install requests[socks]
super helpful:
- http://packetforger.wordpress.com/2013/08/27/pythons-requests-module-with-socks-support-requesocks/
- http://docs.python-requests.org/en/master/user/advanced/#proxies
"""
@JesterXL
JesterXL / dart-login-django.dart
Created March 4, 2014 03:08
Sample Dart code to login to Django
void getToken()
{
print("getToken");
getTokenService = new GetTokenService();
getTokenService.getToken().then((ServiceEvent event)
{
login();
});
}
@brandonkelly
brandonkelly / templating.md
Last active February 7, 2024 15:20
Templating in EE vs. Craft
@atk
atk / ie10hack.css
Created November 6, 2012 14:43
IE10 hack
/*
#ie10 will only be red in MSIE 10,
both in high contrast (display setting) and default mode
*/
@media screen and (-ms-high-contrast: active), (-ms-high-contrast: none) {
#ie10 { color: red; }
}
@benmcnelly
benmcnelly / default.py
Created August 8, 2012 00:50 — forked from HansMayer/default.py
XBMC rtmpGUI plugin with multiple source lists, local source lists (file://), channel logos (<logourl>) and distinction by language
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import urllib, urllib2, cookielib
import string, os, re, time, datetime, sys
import xbmc, xbmcgui, xbmcplugin, xbmcaddon
BASE = [
'http://apps.ohlulz.com/rtmpgui/list.xml',
#'http://localhost/links.xml',
@benmcnelly
benmcnelly / default.py
Created August 8, 2012 00:48 — forked from anonymous/default.py
XBMC rtmpGUI plugin with multiple source lists, channel logos and distinction by language
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import urllib, urllib2, cookielib
import string, os, re, time, datetime, sys
import xbmc, xbmcgui, xbmcplugin, xbmcaddon
#from xml.etree import ElementTree
from elementtree import ElementTree