Skip to content

Instantly share code, notes, and snippets.

# -*- coding: utf-8 -*-
import os
import sys
from flask.ext.script import Command, Option
class GunicornServer(Command):
"""Run the app within Gunicorn"""
@jiaaro
jiaaro / hotkey_helpers.js
Last active February 27, 2023 22:01
Mac Automation – Javascript (JSX) Hotkey helpers
// How to use:
// 1. Open "Script Editor" (requires OS X 10.10 Yosemite)
// 2. Change the language from "AppleScript" to "JavaScript"
// 3. Paste the code below and replace the safari example.
//
// More info:
// https://developer.apple.com/library/mac/releasenotes/InterapplicationCommunication/RN-JavaScriptForAutomation/index.html
var sys_events = Application("System Events");
@exit99
exit99 / Auto-Dave
Last active March 1, 2016 19:35
Automating Dave's Job
import time
import urllib2
from datetime import datetime
def do_dave():
while 10 < datetime.now().hour < 15:
time.sleep(5)
urllib2.urlopen('http://www.reddit.com/')

This is a remote course where you'll be learning on a remote classroom with a real teacher, real classmates and real assignments. The estimated duration of the course is 6 weeks, attending 2 classes per week, 2 hours per class.

We're going to do two courses. One for beginners who want to learn "how to program" and other for novice programmers who want to master advanced concepts and web programming. Check the contents bellow.

Attention: Please check the schedule section for details before applying

Apply now: http://goo.gl/forms/PzlAanzDYf

What are we doing

@r00k
r00k / vimrc
Last active May 13, 2023 09:34
A minimal vimrc for beginners
" A minimal vimrc for new vim users to start with.
"
" Referenced here: http://www.benorenstein.com/blog/your-first-vimrc-should-be-nearly-empty/
" Original Author: Bram Moolenaar <Bram@vim.org>
" Made more minimal by: Ben Orenstein
" Last change: 2012 Jan 20
"
" To use it, copy it to
" for Unix and OS/2: ~/.vimrc
@jaxbot
jaxbot / gist:54eaeac526c4e161e4c7
Last active August 29, 2015 14:18
PyCon WiFi auto-j'accepte

Here's how to automatically log in to the WiFi at PyCon. Dumping out a few different methods here, check back for updates!

Chrome

  1. Install Tampermonkey
  2. Add this script:
// ==UserScript==
// @name         Pycon auto j'accept
// @namespace http://your.homepage/
@max-mapper
max-mapper / readme.md
Last active May 14, 2022 09:12
list of interdisciplinary open source conferences

Interdisciplinary Open Source Community Conferences

Criteria

  • Must be an event that someone involved in open source would be interested in attending
  • Must be a community oriented event (no corporate owned for-profit events here please)
  • Can't be about a specific language/framework.

Leave suggestions in the comments below

@jorinvo
jorinvo / challenge.md
Last active April 21, 2023 17:14
This is a little challenge to find out which tools programmers use to get their everyday tasks done quickly.

You got your hands on some data that was leaked from a social network and you want to help the poor people.

Luckily you know a government service to automatically block a list of credit cards.

The service is a little old school though and you have to upload a CSV file in the exact format. The upload fails if the CSV file contains invalid data.

The CSV files should have two columns, Name and Credit Card. Also, it must be named after the following pattern:

YYYYMMDD.csv.

@samatjain
samatjain / Meetup-past-events.py
Last active January 4, 2022 16:01
Dump all the previous events for a Meetup.com group. See http://blog.samat.org/2015/10/23/Getting-All-Past-Meetup-Events/
#!/usr/bin/env python3
import collections
import datetime
import pprint
import click
import jinja2
import requests
@gilbarbara
gilbarbara / gitsubmodules.sh
Last active October 18, 2022 23:45
Install git submodules from a .gitmodules file
#!/bin/sh
set -e
git config -f .gitmodules --get-regexp '^submodule\..*\.path$' |
while read path_key path
do
url_key=$(echo $path_key | sed 's/\.path/.url/')
url=$(git config -f .gitmodules --get "$url_key")
git submodule add $url $path