Skip to content

Instantly share code, notes, and snippets.

View Ramblurr's full-sized avatar

Casey Link Ramblurr

View GitHub Profile
#in myquery.sql you can have a VEERY BIG SQL file that you need to run on CartoDB, like a huge INSERT or UPDATE
curl --data "api_key=XXXXXXXXXXXXXXXXXXXXXXXXX&q=`cat myquery.sql`" https://jatorre.cartodb.com/api/v1/sql
@hrpunio
hrpunio / tcx2gpx
Created July 24, 2013 09:46
Convert TCX (Garmin Edge) to GPX with gpsbabel
#!/bin/bash
# Convert TCX (Garmin Edge) to GPX with gpsbabel
# Usage: tcx2gpx tcx-file-name [-o gpx-file-name] -max 999
# -o -- gpx-file-name, if not given, computed from tcx-file-name (it is assumed YYYY-MM-DD*.tcx)
# -max -- produce simplified track with maximum 999 trkpoints
#
SIMPLIFY=""
if [ $# -eq 0 ]; then
@duairc
duairc / fonts.css
Created February 15, 2014 02:26
Given the name of a font family, generate webfonts + a CSS file on a Linux system
#!/bin/sh
clean () {
perl -pe 's/(\([si]\)\s*)+//' | tr '"' ' ' | awk '{$1=""; print $0}' | xargs echo
}
subset () {
python /usr/share/googlefontdirectory-tools/tools/subset/subset.py --subset=latin+latin-ext+greek+greek-ext+cyrillic+cyrillic-ext --nmr --null --roundtrip --script "$1" "$2"
}
@lzubiaur
lzubiaur / svgexport.py
Last active February 5, 2018 10:47
Batch export for Inkscape
#!/usr/bin/env python
# -*- coding: latin-1 -*-
"""
svgexport.py - Batch export for Inkscape - Laurent Zubiaur
description:
Python script that can be used to automate batch exports of Inkscape objects by providing their id (set in the Object Properties dialog).
Also useful to batch export with a specific dpi (only available for individual object export in GUI mode).
For all available inkscape command line options see http://inkscape.org/doc/inkscape-man.html.
@mediavrog
mediavrog / IconizedMenu.java
Last active September 17, 2022 13:17
Android Compatibility popup menu with icons (requires support library v7)
/**
* Seems like the only way to use it currently (as of 10/2018) is through reflection
* see https://resocoder.com/2018/02/02/popup-menu-with-icons-android-kotlin-tutorial-code/
**/
package com.vuzz.snapdish.ui;
import android.content.Context;
import android.support.v7.internal.view.SupportMenuInflater;
import android.support.v7.internal.view.menu.MenuBuilder;
@yan-foto
yan-foto / OpenWRT | OpenVPN | PIA - README.md
Last active January 5, 2020 22:25
OpenWRT configurations to run OpenVPN client | Private Internet Access - https://www.privateinternetaccess.com

This gist contains all the OpenWRT configuraion files needed to connect to Private Internet Access (PIA) VPN servers. The following files are included:

  • network: contains configuration to add a virtual network device (i.e. tun1366) and custom DNS servers
  • openvpn: OpenVPN configuration file to connect to PIA VPN servers
  • firewall: firewall configuration which passes all traffic through VPN and rejects any request when OpenVPN is down

NOTE: there are a number of other files required to be available under /etc/openvpn for this approach to work:

  • pia.auth: VPN credentials in two lines, first the username and the second the password
@lopezjurip
lopezjurip / README.md
Created December 16, 2016 21:08
macOS: Yarn + nvm with globals (bins) to $PATH

Yarn and nvm

  • Requisites: brew

Install nvm:

brew install nvm
@tybl
tybl / budget.ledger
Created May 27, 2017 14:57
YNAB budgeting with ledger-cli
; This is a simple method of maintaining a budget using
; double-entry accounting software.
; Usually, double-entry accounting keeps track of
; assets, liabilities, income, and expenses. However,
; income/expense categories are different than budget
; categories. For one thing, income/expense categories
; continually grow, where budget categories tend to rise
; and fall. I decided to replace tracking my income/
; expenses with tracking my budget.
@vidia
vidia / nginx-unificontroller.conf
Last active December 7, 2024 18:26
Example, working, NGINX config for proxying to Unifi Controller software and using letsencrypt. Includes websocket fix.
# I had a bit of trouble getting my unifi controller (hosted offsite) to use a proxy/letsencrypt. So here are the fruits of my labor.
# The unifi default port is 8443 running on localhost.
# License: CC0 (Public Domain)
server {
# SSL configuration
#
listen 443 ssl default_server;
listen [::]:443 ssl default_server;
@krisleech
krisleech / 00-ideavimrc
Last active March 8, 2023 14:23
vimrc for IDEAvim plugin for IntelliJ IDEA IDE with Cursive plugin. #clojure #vim
set surround
set hlsearch
set scrolloff=3
set ignorecase smartcase
set showmode
set history=1000
set relativenumber
set number