Skip to content

Instantly share code, notes, and snippets.

View clrh's full-sized avatar

Claire Hernandez clrh

View GitHub Profile
// ==UserScript==
// @name Sophy with Pfaf
// @namespace http://tampermonkey.net/
// @version 0.4
// @description Display Sophy phytotypes with Pfaf data
// @author Clrh
// @match https://sophy.tela-botanica.org/*
// @grant GM_xmlhttpRequest
// @grant GM_addStyle
// ==/UserScript==
@apolloclark
apolloclark / postgres cheatsheet.md
Last active March 25, 2026 18:43
postgres cheatsheet

Postgres Cheatsheet

This is a collection of the most common commands I run while administering Postgres databases. The variables shown between the open and closed tags, "<" and ">", should be replaced with a name you choose. Postgres has multiple shortcut functions, starting with a forward slash, "". Any SQL command that is not a shortcut, must end with a semicolon, ";". You can use the keyboard UP and DOWN keys to scroll the history of previous commands you've run.

Setup

installation, Ubuntu

http://www.postgresql.org/download/linux/ubuntu/ https://help.ubuntu.com/community/PostgreSQL

@nrichand
nrichand / bitbucket.rb
Last active June 1, 2016 13:50
Bitbucket open PR
require 'httparty'
require 'json'
require 'time'
SCHEDULER.every '5m', :first_in => 0 do |job|
projects = ["REPOSITORY NAMES"]
prs = []
projects.each do |project|
@nrichand
nrichand / teammood.coffee
Created July 22, 2015 16:25
Dashing.io widget for http://www.teammood.com/ users. Display the moods of the day for the team
class Dashing.Teammood extends Dashing.Widget
@wpscholar
wpscholar / vagrant-cheat-sheet.md
Last active April 12, 2026 12:55
Vagrant Cheat Sheet

Typing vagrant from the command line will display a list of all available commands.

Be sure that you are in the same directory as the Vagrantfile when running these commands!

Creating a VM

  • vagrant init -- Initialize Vagrant with a Vagrantfile and ./.vagrant directory, using no specified base image. Before you can do vagrant up, you'll need to specify a base image in the Vagrantfile.
  • vagrant init <boxpath> -- Initialize Vagrant with a specific box. To find a box, go to the public Vagrant box catalog. When you find one you like, just replace it's name with boxpath. For example, vagrant init ubuntu/trusty64.

Starting a VM

  • vagrant up -- starts vagrant environment (also provisions only on the FIRST vagrant up)
@noreiller
noreiller / backup-full.sh
Last active January 4, 2016 16:30
Geeksphone Peak backup scripts
#!/bin/sh
BACKUP_DATE=`date +%Y-%m-%d_%H-%M-%S`
BACKUP_DIR="~/PEAK/BACKUPS/$BACKUP_DATE"
mkdir -p "$BACKUP_DIR"
cd "$BACKUP_DIR"
sudo adb pull /data/local/storage/persistent/
@mderazon
mderazon / export-to-csv.gs
Last active October 9, 2025 17:55
Google apps script to export to individual csv files all sheets in an open spreadsheet
/*
* script to export data in all sheets in the current spreadsheet as individual csv files
* files will be named according to the name of the sheet
* author: Michael Derazon
*/
function onOpen() {
var ss = SpreadsheetApp.getActiveSpreadsheet();
var csvMenuEntries = [{name: "export as csv files", functionName: "saveAsCSV"}];
ss.addMenu("csv", csvMenuEntries);
@lelandbatey
lelandbatey / whiteboardCleaner.md
Last active April 11, 2026 13:51
Whiteboard Picture Cleaner - Shell one-liner/script to clean up and beautify photos of whiteboards!

Description

This simple script will take a picture of a whiteboard and use parts of the ImageMagick library with sane defaults to clean it up tremendously.

The script is here:

#!/bin/bash
convert "$1" -morphology Convolve DoG:15,100,0 -negate -normalize -blur 0x1 -channel RBG -level 60%,91%,0.1 "$2"

Results

@sloria
sloria / bobp-python.md
Last active April 11, 2026 05:03
A "Best of the Best Practices" (BOBP) guide to developing in Python.

The Best of the Best Practices (BOBP) Guide for Python

A "Best of the Best Practices" (BOBP) guide to developing in Python.

In General

Values

  • "Build tools for others that you want to be built for you." - Kenneth Reitz
  • "Simplicity is alway better than functionality." - Pieter Hintjens
@aponxi
aponxi / sql-mongo_comparison.md
Last active December 12, 2024 01:11
MongoDb Cheat Sheets

SQL to MongoDB Mapping Chart

SQL to MongoDB Mapping Chart

In addition to the charts that follow, you might want to consider the Frequently Asked Questions section for a selection of common questions about MongoDB.

Executables

The following table presents the MySQL/Oracle executables and the corresponding MongoDB executables.