Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View ropable's full-sized avatar

Ashley Felton ropable

View GitHub Profile
@ropable
ropable / dTable.js
Last active October 12, 2015 03:50
Using jQuery DataTables 1.10.9 with a server-side data source (via Django Tastypie)
$(function () {
// DataTables configuration.
conf = {
processing: true,
serverSide: true,
searching: false, // Disable search filter.
//searchDelay: 500,
ordering: false, // Disable column sorting.
pageLength: 25, // Initial number of results to show.
pagingType: "numbers", // Simple paging style.
@ropable
ropable / emojis.txt
Created March 9, 2017 02:39
Emoji database
¢‿¢
©¿© o
ª{•̃̾_•̃̾}ª
¬_¬
¯\(º_o)/¯
¯\(º o)/¯
¯\_(⊙︿⊙)_/¯
¯\_(ツ)_/¯
°ω°
°Д°
@ropable
ropable / postgres_queries_and_commands.sql
Last active March 21, 2017 01:40 — forked from rgreenjr/postgres_queries_and_commands.sql
Useful PostgreSQL Queries and Commands
-- show running queries (pre 9.2)
SELECT procpid, age(query_start, clock_timestamp()), usename, current_query
FROM pg_stat_activity
WHERE current_query != '<IDLE>' AND current_query NOT ILIKE '%pg_stat_activity%'
ORDER BY query_start desc;
-- show running queries (9.2)
SELECT pid, age(query_start, clock_timestamp()), usename, query
FROM pg_stat_activity
WHERE query != '<IDLE>' AND query NOT ILIKE '%pg_stat_activity%'

Keybase proof

I hereby claim:

  • I am ropable on github.
  • I am ropable (https://keybase.io/ropable) on keybase.
  • I have a public key whose fingerprint is CDD1 FF46 6C55 4FAD DE3B EE5E B3A6 E822 BC37 6290

To claim this, I am signing this object:

@ropable
ropable / web-servers.md
Created January 22, 2020 04:30 — forked from willurd/web-servers.md
Big list of http static server one-liners

Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.

Discussion on reddit.

Python 2.x

$ python -m SimpleHTTPServer 8000
@ropable
ropable / cloudflare-ddns-update.sh
Last active May 28, 2021 13:49 — forked from Tras2/cloudflare-ddns-update.sh
A bash script to update a Cloudflare DNS A record with the external IP of the source machine
#!/bin/bash
ZONE=domain.com
DNSRECORD=sub.domain.com
TOKEN=<token>
# Get the current external IP address
IP=$(curl -s -X GET https://checkip.amazonaws.com)
CURRENTDATE=`date`