Skip to content

Instantly share code, notes, and snippets.

View rugk's full-sized avatar
🤔
Thinking…

rugk rugk

🤔
Thinking…
View GitHub Profile
@rugk
rugk / regexptest.php
Last active August 29, 2015 14:27
PHP regular expression test script
<!DOCTYPE HTML>
<!-- original: https://gist.github.com/rugk/3ce33ef42df17cefac28 -->
<style>
pre {
background-color: #e4dc97;
overflow: scroll;
}
</style>
<?php
echo 'PHP version: ' . PHP_VERSION;
@rugk
rugk / colortest.css
Last active August 27, 2015 17:59
CSS color test for editors with color highlighting
test {
background-color: #b03f3f;
}
@rugk
rugk / sample.csv
Last active September 26, 2015 15:42
Sample CSV
REVIEW_DATE AUTHOR ISBN DISCOUNTED_PRICE
1985/01/21 Douglas Adams 0345391802 5.95
1990/01/12 Douglas Hofstadter 0465026567 9.95
1998/07/15 Timothy "The Parser" Campbell 0968411304 18.99
1999/12/03 Richard Friedman 0060630353 5.95
2001/09/19 Karen Armstrong 0345384563 9.95
2002/06/23 David Jones 0198504691 9.95
2002/06/23 Julian Jaynes 0618057072 12.50
2003/09/30 Scott Adams 0740721909 4.95
2004/10/04 Benjamin Radcliff 0804818088 4.95
@rugk
rugk / sample.md
Created August 27, 2015 19:48
Markdown sample

Markdown Preview package Build Status

Show the rendered HTML markdown to the right of the current editor using ctrl-shift-m

It can be activated from the editor using the ctrl-shift-m key-binding and is currently enabled for .markdown, .md, .mdown, .mkd, .mkdown, .ron, and .txt files.

@rugk
rugk / decoded certificate
Last active October 20, 2015 19:31
sebsauvage.net interception by celrec.com
Certificate:
Data:
Version: 3 (0x2)
Serial Number: 246075 (0x3c13b)
Signature Algorithm: sha256WithRSAEncryption
Issuer: C=US, O=GeoTrust Inc., CN=RapidSSL SHA256 CA - G3
Validity
Not Before: Apr 16 13:28:30 2015 GMT
Not After : May 18 19:22:05 2016 GMT
Subject: OU=GT50722977, OU=See www.rapidssl.com/resources/cps (c)15, OU=Domain Control Validated - RapidSSL(R), CN=www.celrec.com
@rugk
rugk / CHANGELOG.md
Last active June 29, 2018 06:55
Stylish reader mode extensions: columns, custom width and real dark background

Changelog.md

2016-09-25

  • removed static width as it breaks the width changing mechanism of Firefox 49

2015-11-25

  • improved comments in css files
  • better config on userstyles.org
@rugk
rugk / piglatin.py
Last active July 26, 2016 09:39
Codeacademy - Python course: Pig Latin (PygLatin) https://www.codecademy.com/learn/python
# constants
pyg = 'ay'
# input
original = raw_input('Enter a word:')
# check for errors
if len(original) > 0 and original.isalpha():
print original
else:
@rugk
rugk / libsodiumdebug_version.php
Last active January 14, 2016 17:08
Libsodium version debug PHP
<?php
// check load state
if (extension_loaded('libsodium')) {
echo 'libsodium is loaded<br/>';
} else {
echo 'libsodium is not loaded<br/>';
exit;
}
// check version
@rugk
rugk / mailvelope_providers.md
Last active February 16, 2016 20:51
E-mail providers using the Mailvelope API
@rugk
rugk / downloadtest.py
Last active June 11, 2016 14:07
Python url download test
#!/usr/bin/env python
# LICENSE: CC0/Public Domain - To the extent possible under law, rugk has waived all copyright and related or neighboring rights to this work. This work is published from: Deutschland.
import sys
try:
from urllib.request import urlopen # Python 3
except ImportError:
from urllib2 import urlopen # Python 2
testurl = "https://..."