Skip to content

Instantly share code, notes, and snippets.

View wassname's full-sized avatar
🙃

Michael J Clark wassname

🙃
View GitHub Profile
@pthrasher
pthrasher / beginner.vimrc.vim
Created October 22, 2012 19:26
A well commented beginner set of vim settings for your ~/.vimrc
" Beginners .vimrc
" v0.1 2012-10-22 Philip Thrasher
"
" Important things for beginners:
" * Start out small... Don't jam your vimrc full of things you're not ready to
" immediately use.
" * Read other people's vimrc's.
" * Use a plugin manager for christ's sake! (I highly recommend vundle)
" * Spend time configuring your editor... It's important. Its the tool you
" spend 8 hours a day crafting your reputation.
@kljensen
kljensen / celery_gevent_flask_fix.py
Created March 14, 2013 11:00
Fixing celery w/ the gevent worker -- Flask, celery, gevent, app_context
"""
If you're using Celery with the gevent worker and a Flask app,
you may have noticed that you're unsuccessful in having the
tasks execute within your Flask app's app_context. Normally,
you can do this
with app.app_context():
celery.start()
...but...doesn't appear to work with the gevent worker pool.
@esamattis
esamattis / asevents.js
Last active October 22, 2021 20:41
Use listenTo/stopListening from Backbone.js with any DOM element
/**
* Use listenTo/stopListening from Backbone.js with any DOM element
*
* Example:
*
* view.listenTo(asEvents(window), "resize", handler);
*
* and the listener will be remove automatically on view.remove() or
* view.stoplistening()
*
import praw
import time
seen = []
def main():
user_agent = ("User stalker 1.0")
r = praw.Reddit(user_agent=user_agent)
r.login('username', 'password')
@wassname
wassname / 1README.md
Last active March 13, 2018 12:35
3Dflex.py

3Dflex.py

A script for calculating 3D flexure in python. Converted from GARRY QUINLAN's fortran program 3dflex.f.

This programme calculates the flexure for 3D elastic sheet where the sheet can have one of its 4 edges as a free edge. It uses a finite difference approach to the 3D flexure problem and lets Te, restoring force and ;loading vary in a random fashion. There are many comments written in the program to guide the user through.

INPUT:

@yashh
yashh / lync_bot.py
Created July 26, 2014 23:53
Python lync API bot
import base64, copy, sys
import requests
import json
from urlparse import urlparse
sip_domain = "company.com"
username = "firstname.lastname@company.com"
password = "somepassword"
def extractAuthURL(str):
@jeffaudi
jeffaudi / gdal2tilesG.py
Last active March 17, 2023 10:14
This is a version of gdal2tiles.py that generates tiles with the Google Maps naming rather than the normal OGC TMS one. This is just an inversion in the direction of the Y axis (ynew = 2^zoom – yold). I have also replaced EPSG:900913 by EPSG:3785 since gdal issues a warning.
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#******************************************************************************
# $Id: gdal2tiles.py 27044 2014-03-16 23:41:27Z rouault $
#
# Project: Google Summer of Code 2007, 2008 (http://code.google.com/soc/)
# Support: BRGM (http://www.brgm.fr)
# Purpose: Convert a raster into TMS (Tile Map Service) tiles in a directory.
# - generate Google Earth metadata (KML SuperOverlay)
# - generate simple HTML viewer based on Google Maps and OpenLayers
@cletusw
cletusw / .eslintrc
Last active February 29, 2024 20:24
ESLint Reset - A starter .eslintrc file that resets all rules to off and includes a description of what each rule does. From here, enable the rules that you care about by changing the 0 to a 1 or 2. 1 means warning (will not affect exit code) and 2 means error (will affect exit code).
{
// http://eslint.org/docs/rules/
"ecmaFeatures": {
"binaryLiterals": false, // enable binary literals
"blockBindings": false, // enable let and const (aka block bindings)
"defaultParams": false, // enable default function parameters
"forOf": false, // enable for-of loops
"generators": false, // enable generators
"objectLiteralComputedProperties": false, // enable computed object literal property names
@nkbt
nkbt / .eslintrc.js
Last active May 5, 2024 07:31
Strict ESLint config for React, ES6 (based on Airbnb Code style)
{
"env": {
"browser": true,
"node": true,
"es6": true
},
"plugins": ["react"],
"ecmaFeatures": {
@caweidmann
caweidmann / eslintrc.js
Last active January 26, 2024 20:19
The "C-Dawg linter" annotation.
/*
**
** kyco.eslintrc
** =============
**
** Based on http://eslint.org/docs/rules/
**
** All rules specified in this file are taken from the URL above. We have
** included every single rule except for rules posted under the "Removed"
** section.