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
| [Unit] | |
| Description=slocker | |
| Before=sleep.target | |
| [Service] | |
| User=gxg | |
| Type=forking | |
| Environment=DISPLAY=:0 | |
| ExecStart=/home/gxg/bin/thinklock |
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
| # ___ __ __ ____ ______ _ # < // // / / __ \ / ____/ (_)____ _ _ __ ____ _ | |
| # / // // /_ / / / //___ \ / // __ `/| | / // __ `/ | |
| # / //__ __// /_/ /____/ / / // /_/ / | |/ // /_/ / | |
| # /_/ /_/ \____//_____/ __/ / \__,_/ |___/ \__,_/ | |
| # /___/ | |
| # __ ____ _ __ | |
| # ____ ___ ____ _ / /__ ___ / __/(_)/ /___ | |
| # / __ `__ \ / __ `// //_// _ \ / /_ / // // _ \ | |
| # / / / / / // /_/ // ,< / __// __// // // __/ | |
| # /_/ /_/ /_/ \__,_//_/|_| \___//_/ /_//_/ \___/ |
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
| client | |
| dev tap | |
| tun-mtu 1500 | |
| tun-mtu-extra 32 | |
| fragment 1300 | |
| mssfix | |
| proto udp | |
| remote 192.168.0.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
| :%s:-af\W:-afg : | |
| :%s:-ax\W:-ala : | |
| :%s:-al\W:-alb : | |
| :%s:-dz\W:-dza : | |
| :%s:-as\W:-asm : | |
| :%s:-ad\W:-and : | |
| :%s:-ao\W:-ago : | |
| :%s:-ai\W:-aia : | |
| :%s:-aq\W:-ata : | |
| :%s:-ag\W:-atg : |
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 | |
| # python monogodb example from Hack The North 2015 | |
| import pymongo | |
| conn = pymongo.MongoClient() | |
| blog_db = conn["blog"] | |
| posts_col = blog_db["posts"] | |
| post = { |
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.4 | |
| import json | |
| import requests | |
| url = 'http://api.ooni.io/api/reports' | |
| r = requests.get(url) | |
| reports = json.loads(r.text) |
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
| // Bootstrap 3 Tooltip Title Override | |
| // Author: Guy Hughes | |
| // Date: 2015-08-15 | |
| // Licence: GNU GPL v3.0 http://www.gnu.org/licenses/gpl-3.0.txt | |
| $.fn.tooltip.Constructor.prototype.getTitle = function () { | |
| var title | |
| var $e = this.$element | |
| var o = this.options | |
| //title = $e.attr('data-original-title') || (typeof o.title == 'function' ? o.title.call($e[0]) : o.title) |
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
| // set Monday to beginning of week | |
| moment.locale('en', {week: {dow: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
| // http://eonasdan.github.io/bootstrap-datetimepicker | |
| // setup a pair of datepickers | |
| // Author: Guy Hughes | |
| // Date: 2015-07-11 | |
| function addDatePickerPair(dpStart,dpEnd) { | |
| // dpStart, dpEnd = /\#[A-z0-9]+/ | |
| // parameters are an ID for a single element | |
| $(dpStart).on("dp.change", function (e) { | |
| $(dpEnd).data("DateTimePicker").minDate(e.date); |
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
| // Uses moment js to parse human durations | |
| // Author: Guy Hughes | |
| // Date: 2015-08-17 | |
| function getPeriod(input) { | |
| // returns an object {start: xxxx, end: xxxx} | |
| // WARN: moment() methods modify object by reference | |
| var start, end; | |
| switch (input) { | |
| case "Tomorrow": | |
| start = moment().add(1,'day'); |