Skip to content

Instantly share code, notes, and snippets.

Syrup-tan Syrup-tan

Block or report user

Report or block Syrup-tan

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@Syrup-tan
Syrup-tan / _readme.md
Last active Feb 15, 2016
simple acme-tiny sh wrapper
View _readme.md

Shell script to generate ssl certificates signed from letsencrypt.

demo

Requires diafygi/acme-tiny.

Requires a web-server with a configured /.well-known/acme-challenge/ set to CHALLENGE_PATH in the third line of the script. See Step 3 of diafygi's great readme

TODO:

  • configurable ./account.key (i.e. not hardcoded)
@Syrup-tan
Syrup-tan / oh god why.js
Created Oct 18, 2015
ENTERPRISE QUALITY STRING REVERSER
View oh god why.js
w = reverse('SebaJun');
while (v = w.next().value) console.log(v);
function *reverse(s) {
yield s;
for (i = 0, j = 0; j++ < s.length; i = 0) while (s[i+1] && i + j < s.length) {
yield s = [
s.slice(0, i),
s.slice(i+1, i+2),
s.slice(i, i+1),
s.slice(i+2),
View w.sh
#!/bin/sh
## Load std
. 'lib-std.sh'
transfer_accountlist() {}
transfer_homedir() {}
transfer_wpdb() {}
transfer_account() {}
View SSL over :80 with nginx.md

SSL over :80 with nginx

Using nginx's error_page directive we can support SSL over both :80 and :443

Why?

Some intrusive firewalls, ISPs, companies, and ``Anti-virus'' programs attempt to intercept SSL connections on :443. Some of these programs even offer their own certificate, in order to perform MiTM attacks. In more extreme cases, connections may be entirely blocked on :443.

By allowing SSL connections on :80, users with these threats may still access the server securely.

How?

Using nginx's

View sasuga, noob-chan.js
caesar(atob('TFdWIFFSVyBEUSBEVlZEVlZMUSwgTFdWIEQgUUxRTUQ7IFFSVyBZRFBTTFVILVJRSCwgV0tSWEpLLg=='), 23);
function caesar(s, n) {
n = n || 13;
var alphabet = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ';
return s.toUpperCase().replace(/./g, function(l) {
var index = alphabet.indexOf(l);
return index < 0 ? l : alphabet[(index + n) % 26];
});
}
View 0 Himawari Scraper
Example: https://denpa.moe/~syrup/himawari8.png
@Syrup-tan
Syrup-tan / stdlib.sh
Created Apr 20, 2015
A simple standard library for posix sh, WIP
View stdlib.sh
#!/bin/sh
## sh stdlib
plus_equals() { FUNCTION="plus_equals()";
## Handle options
case "$1" in
-h)
echo;
View 0 anya.txt.sh
#!/bin/sh
## Configuration
OUTPUT=~/www/anya.txt;
## Get the search scripts
. ~/www/search.bash;
## Get all of the messages from Anya that contain danbooru
from_buffer '#r/a/dio' | grep_nick 'Anya' | grep 'danbooru' > "$OUTPUT";
@Syrup-tan
Syrup-tan / search.bash
Last active Aug 29, 2015
A simple ZNC search script.
View search.bash
#!/bin/bash
## search.{bash,zsh} v0.0.3
## Configuration
LOG_DIR=~znc/'.znc/moddata/log/syrup-tan';
DEFAULT_SERVER='rizon';
## Usage
## Source the file with $ . ./search.bash
## All queries must begin with a from_* function
View init.sh
#!/bin/sh
## MySQL Setup Configuration
MYSQL_DATABASE='mydb_name';
MYSQL_USERNAME='mydb_user';
INCLUDE_DEVELOPER_DEFAULTS=false;
## Get the MySQL files
You can’t perform that action at this time.