This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # This project has been moved to https://github.com/Jamesits/vps2routeros. | |
| # This script is still kept for compatibility, but it will not be updated anymore. | |
| echo "You are using an old version of vps2routeros. Please download the new version from https://github.com/Jamesits/vps2routeros ." | |
| # VPS2RouterOS | |
| # | |
| # !!!!!!!!!PLEASE READ ALL THE FOLLOWING TEXT BEFORE RUNNING THIS!!!!!!!!!!! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env python3 | |
| # by James Swineson, 2017-02-05 | |
| # https://gist.github.com/Jamesits/ab9755dc87424bfb1523f45096b1b129 | |
| import re, collections, codecs | |
| class TKVParser: | |
| # string.split with a list of delimiters support | |
| @staticmethod | |
| def __split(delimiters: list, string: str, maxsplit: int=0) -> list: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| sudo apt install zlib1g zlib1g-dev | |
| cd /usr/local/src | |
| sudo git clone https://github.com/yarrick/iodine.git | |
| cd iodine | |
| sudo make | |
| sudo make install |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Should work on all Debian based distros with systemd; tested on Ubuntu 16.04+. | |
| # This will by default install all plugins; you can customize this behavior on line 6. Selecting too many plugins can cause issues when downloading. | |
| # Run as root (or sudo before every line) please. Note this is not designed to be run automatically; I recommend executing this line by line. | |
| apt install curl | |
| curl https://getcaddy.com | bash -s personal dns,docker,dyndns,hook.service,http.authz,http.awses,http.awslambda,http.cache,http.cgi,http.cors,http.datadog,http.expires,http.filemanager,http.filter,http.forwardproxy,http.geoip,http.git,http.gopkg,http.grpc,http.hugo,http.ipfilter,http.jekyll,http.jwt,http.locale,http.login,http.mailout,http.minify,http.nobots,http.prometheus,http.proxyprotocol,http.ratelimit,http.realip,http.reauth,http.restic,http.upload,http.webdav,net,tls.dns.auroradns,tls.dns.azure,tls.dns.cloudflare,tls.dns.cloudxns,tls.dns.digitalocean,tls.dns.dnsimple,tls.dns.dnsmadeeasy,tls.dns.dnspod,tls.dns.dyn,tls. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env python | |
| story = "Xoqy Tzcfsm wg o amhvwqoz qvofoqhsf qfsohsr cb hvs gdif ct o acasbh hc vszd qcjsf ob wbgittwqwsbhzm dzobbsr voqy. Vs vog pssb fsuwghsfsr tcf qzoggsg oh AWH hkwqs pstcfs, pih vog fsdcfhsrzm bsjsf doggsr oqzogg. Wh vog pssb hvs hforwhwcb ct hvs fsgwrsbhg ct Sogh Qoadig hc psqcas Xoqy Tzcfsm tcf o tsk bwuvhg soqv msof hc sriqohs wbqcawbu ghirsbhg wb hvs komg, asobg, obr shvwqg ct voqywbu." | |
| shift = 12 | |
| # def ceasar(string, shift_rounds) | |
| # -26 < shift_rounds < 26 | |
| # if you use round i to encode, then use -i to decode | |
| ceasar = lambda s,n:''.join([(lambda c,u:c.upper() if u else c)(("abcdefghijklmnopqrstuvwxyz"*2)[ord(c.lower())-97+n%26],c.isupper())if c.isalpha() else c for c in s]) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env python | |
| from __future__ import print_function | |
| def get_permutation(mystr): | |
| # base case | |
| if len(mystr) <= 1: | |
| return [mystr] | |
| # recursion | |
| else: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # for Ubuntu | |
| sudo apt-get install build-essential libreadline-dev libconfig-dev libssl-dev lua5.2 liblua5.2-dev libevent-dev libjansson-dev libpython-dev make | |
| git clone https://github.com/vysheng/tg.git --recursive | |
| cd tg | |
| ./configure | |
| make |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env python3 | |
| # by @Jamesits 2016-08-23 | |
| # Great thanks to @m13253 | |
| def dec_unicode_decode(s): | |
| return ''.join((bytes([x&255, x>>8]).decode('utf-16-le') for x in map(int, s.split('#')[1:]))) | |
| def dec_unicode_encode(s): | |
| return '#' + '#'.join([str(int(x, 16)) for x in str(s.encode("unicode-escape"))[2:-1].split("\\\\u")[1:]]) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # Public Domain | |
| # (someone claimed the next lines would be useful for… | |
| # people. So here goes: © 2012 Stefan Breunig | |
| # stefan+measure-net-speed@mathphys.fsk.uni-heidelberg.de) | |
| # modified by James Swineson <github@public.swineson.me> | |
| # interfaces | |
| interfaces=(enp1s0 wlp2s0) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* | |
| by James Swineson, 2016-06-30 | |
| Apply to: URL starts with http://www.jjwxc.net/onebook.php?novelid= | |
| */ | |
| body { | |
| background: moccasin !important; | |
| } | |
| body>div { |