Skip to content

Instantly share code, notes, and snippets.

View dev.sql
set search_path = "db10838396-cwt";
CREATE OR REPLACE FUNCTION timeline(bigint)
RETURNS TABLE
(
timeline text
)
ROWS 1
LANGUAGE SQL
AS
View gist:922fd7624a04bba2e302339223d23c5d
I'm a Java developer.
- No "show documentation"
- No "jump into" (yes ctags, but jumping into lib code?)
- No “show usages” (yes ctags and GNU global, but come on!)
- all the imports
- all the imports
All the "make Vim an IDE" is scam.
View helloworld.dat
UEsDBAoAAAAAAEROJ00AAAAAAAAAAAAAAAAGAAAAX3JlbHMvUEsDBAoAAAAAAEROJ02Zn0XQ8gAAAPIAAAALAAAAX3JlbHMvLnJlbHM8UmVsYXRpb25zaGlwcyB4bWxucz0naHR0cDovL3NjaGVtYXMub3BlbnhtbGZvcm1hdHMub3JnL3BhY2thZ2UvMjAwNi9yZWxhdGlvbnNoaXBzJz48UmVsYXRpb25zaGlwIElkPSdySWQxJyBUYXJnZXQ9J3dvcmQvZG9jdW1lbnQueG1sJyBUeXBlPSdodHRwOi8vc2NoZW1hcy5vcGVueG1sZm9ybWF0cy5vcmcvb2ZmaWNlRG9jdW1lbnQvMjAwNi9yZWxhdGlvbnNoaXBzL29mZmljZURvY3VtZW50Jy8+PC9SZWxhdGlvbnNoaXBzPlBLAwQKAAAAAABETidNAAAAAAAAAAAAAAAABQAAAHdvcmQvUEsDBAoAAAAAAEROJ00AAAAAAAAAAAAAAAALAAAAd29yZC9fcmVscy9QSwMECgAAAAAARE4nTf0+HR/4AgAA+AIAABwAAAB3b3JkL19yZWxzL2RvY3VtZW50LnhtbC5yZWxzPFJlbGF0aW9uc2hpcHMgeG1sbnM9J2h0dHA6Ly9zY2hlbWFzLm9wZW54bWxmb3JtYXRzLm9yZy9wYWNrYWdlLzIwMDYvcmVsYXRpb25zaGlwcyc+PFJlbGF0aW9uc2hpcCBJZD0ncklkMycgVGFyZ2V0PSd3ZWJTZXR0aW5ncy54bWwnIFR5cGU9J2h0dHA6Ly9zY2hlbWFzLm9wZW54bWxmb3JtYXRzLm9yZy9vZmZpY2VEb2N1bWVudC8yMDA2L3JlbGF0aW9uc2hpcHMvd2ViU2V0dGluZ3MnLz48UmVsYXRpb25zaGlwIElkPSdySWQyJyBUYXJnZXQ9J3NldHRpbmdzLnhtbCcgVHlwZT0naHR0cDovL3NjaGVtYXMub3BlbnhtbGZvcm1hdHMub3JnL29mZmljZURv
View banner.txt
,----,
,/ .`|
,----.. .---. ,` .' :
/ / \ /. ./| ; ; /
| : : .--'. ' ; .'___,/ ,'
. | ;. / /__./ \ : | | : |
. ; /--` .--'. ' \' . ; |.'; ;
; | ; /___/ \ | ' ' `----' | |
| : | ; \ \; : ' : ;
. | '___ \ ; ` | | | '
@Zemke
Zemke / HelloWorldResourceTest.java
Last active Apr 27, 2018
CXF REST Service Unit Test
View HelloWorldResourceTest.java
package de.tracx.pkp.rest.service;
import java.io.IOException;
import org.apache.cxf.endpoint.Server;
import org.apache.cxf.jaxrs.JAXRSServerFactoryBean;
import org.apache.cxf.jaxrs.lifecycle.SingletonResourceProvider;
import org.apache.http.HttpResponse;
import org.apache.http.client.methods.HttpGet;
import org.apache.http.impl.client.DefaultHttpClient;
@Zemke
Zemke / beautiful-soup.py
Last active Mar 30, 2018
Takes an HTML file or a path to recursively associate input fields and labels using `id` and `for` attributes.
View beautiful-soup.py
import os
import re
import sys
from typing import IO
from bs4 import BeautifulSoup
from bs4.element import Tag
if len(sys.argv) == 2:
argv_path = sys.argv[1]
@Zemke
Zemke / src-backup.sh
Created Nov 17, 2017
Copy uncommitted changes to /d/src-backups. Requires my `git s` alias.
View src-backup.sh
DIR=$(date +%s); mkdir -p /d/src-backups/$DIR && cp $(git s | sed 's/A//' | sed 's/M//' | sed 's/ *//' | grep pkp) /d/src-backups/$DIR