Skip to content

Instantly share code, notes, and snippets.

View spookyuser's full-sized avatar
🌎
reading and writing

spookyuser

🌎
reading and writing
View GitHub Profile
@iani
iani / emacs_orgmode_capture
Created May 10, 2011 14:41
my latest capture setup for emacs orgmode
;; Settings from March 5 2011 onwards:
;; TODO states and keys:
(setq org-todo-keywords
'(
(sequence "TODO(t)" "|" "DONE(d)" "CANCELLED(c)")
;; (sequence "TODO(t)" "STARTED(s)" "WAITING(w)" "APPT(a)" "EVT(e)" "TRAVEL(v)" "CLASS(c)"
;; "|" "DONE(D)" "CANCELLED(C)" "DEFERRED(F)")
;; (sequence "DELEGATED(l)" "FOLLOWUP(p)")
@zxcvbnm4709
zxcvbnm4709 / gist:2656197
Created May 10, 2012 22:06
include jQuery in Chrome Console
var script = document.createElement("script");
script.setAttribute("src", "http://ajax.googleapis.com/ajax/libs/jquery/1.6.4/jquery.min.js");
script.addEventListener('load', function() {
var script = document.createElement("script");
document.body.appendChild(script);
}, false);
document.body.appendChild(script);
@willurd
willurd / web-servers.md
Last active July 22, 2024 15:25
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
@dodyg
dodyg / gist:5823184
Last active March 29, 2024 03:59
Kotlin Programming Language Cheat Sheet Part 1

#Intro

Kotlin is a new programming language for the JVM. It produces Java bytecode, supports Android and generates JavaScript. The latest version of the language is Kotlin M5.3

Kotlin project website is at kotlin.jetbrains.org.

All the codes here can be copied and run on Kotlin online editor.

Let's get started.

@ignamv
ignamv / gist:6406714
Last active December 30, 2021 19:21
Zotero translator for libgen.org
{
"translatorID": "d1b38d36-6bcc-4828-969f-b08a2a2e0723",
"label": "Libgen",
"creator": "Ignacio Martinez V.",
"target": "libgen\\.org|gen\\.lib\\.rus\\.ec",
"minVersion": "1.0",
"maxVersion": "",
"priority": 100,
"inRepository": true,
"translatorType": 4,

django-test-abstract-models

a TestCase subclass to help you test your abstract django models

usage:

1- subclass your django abstract models

@mscharhag
mscharhag / Java8DateTimeExamples.java
Created February 24, 2014 19:53
Examples for using the Java 8 Date and Time API (JSR 310)
import java.time.*;
import java.time.format.DateTimeFormatter;
import java.time.format.FormatStyle;
import java.time.temporal.ChronoUnit;
import java.time.temporal.TemporalAdjusters;
import java.util.*;
import static java.time.temporal.TemporalAdjusters.*;
public class Java8DateTimeExamples {
@synackme
synackme / dnsleak.sh
Created March 4, 2014 08:23
Check if your ISP is intercepting DNS queries It's somewhat common ISPs to intercept DNS queries at port 53 and resolve them at their own. To check if your ISP is intercepting your DNS queries just type this command in the terminal. "#.abc" it's an OK answer. But if you get something like "I am not an OpenDNS resolver.", yep, you are beign cheat…
dig +short which.opendns.com txt @208.67.220.220
@ameyavilankar
ameyavilankar / preprocess.py
Last active January 25, 2023 10:19
Removing Punctuation and Stop Words nltk
import string
import nltk
from nltk.tokenize import RegexpTokenizer
from nltk.corpus import stopwords
import re
def preprocess(sentence):
sentence = sentence.lower()
tokenizer = RegexpTokenizer(r'\w+')
tokens = tokenizer.tokenize(sentence)
@jsomers
jsomers / android-websters.md
Last active April 20, 2024 01:15
Instructions for using Webster's 1913 on Android

To use Webster's 1913 dictionary on Android, install Colordict 3, an app that accepts this StarDict format. https://play.google.com/store/apps/details?id=com.socialnmobile.colordict

Next download James's S3 archive. https://s3.amazonaws.com/jsomers/dictionary.zip

You will need to extract the .dict file from inside three containers - .dz, .tar, .bz2 from innermost to outermost. 7zip handles all of these formats.

Place the .dict, .idx and .ifo files in the dictdata directory on your sdcard or local storage root. This is where colordict looks for dictionaries.

When the files are in the right place, you can run Colordict and tap the folder icon in the top right to see the dictionaries installed and set the dictionary priority. I put the 1913 dictionary above the defaults "Wordnet" and "Wikipedia." When you look up a word, ColorDict shows the definition, if available, from these multiple sources.