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
| [ | |
| { | |
| "id": "966d4a60.9dcaa8", | |
| "type": "tcp in", | |
| "z": "f5965567.2c44c8", | |
| "name": "", | |
| "server": "server", | |
| "host": "", | |
| "port": "8000", | |
| "datamode": "stream", |
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
| db.getCollection('list').aggregate([ | |
| { | |
| $facet: { | |
| "events":[{ | |
| $match: { | |
| 'type': 'Event' | |
| } | |
| }], | |
| "tasks": [{ | |
| $match: { |
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
| <?php | |
| $db = new SQLite3('typecho.db'); | |
| $result = $db->query("SELECT a.cid, a.title, a.slug, a.text, a.created, a.status, | |
| CASE c.type | |
| WHEN 'tag' THEN group_concat(c.name) | |
| END tags, | |
| CASE c.type | |
| WHEN 'category' THEN group_concat(c.name) |
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
| # pulled from http://xecdesign.com/qemu-emulating-raspberry-pi-the-easy-way/ | |
| # expanded via http://superuser.com/questions/690060/how-to-enable-network-with-a-raspberry-pi-emulated-on-qemu | |
| # tested with 2015-02-16-raspbian-wheezy.zip on OSX Mavericks | |
| # OSX terminal | |
| brew install qemu | |
| # kernel-qemu is a linux kernel compiled with ARM1176 support. | |
| # learn more here: http://xecdesign.com/compiling-a-kernel/ | |
| curl -OL http://xecdesign.com/downloads/linux-qemu/kernel-qemu | |
| curl -o raspbian_latest.zip -L http://downloads.raspberrypi.org/raspbian_latest |
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/sh | |
| ######################################## | |
| # | |
| # Tommy DnsPod DDNS Client v0.2.0 | |
| # | |
| # Author: Tommy Lau <tommy@gen-new.com> | |
| # | |
| # Created: 2015-02-23 08:52:00 UTC | |
| # Updated: 2016-07-15 15:48:00 UTC |
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
| // Use Gists to store code you would like to remember later on | |
| console.log(window); // log the "window" object to the console |
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
| maildirmake /etc/skel/Maildir | |
| maildirmake /etc/skel/Maildir/.Drafts | |
| maildirmake /etc/skel/Maildir/.Sent | |
| maildirmake /etc/skel/Maildir/.Trash | |
| maildirmake /etc/skel/Maildir/.Templates | |
| Then, for an existing user: | |
| cp -r /etc/skel/Maildir /home/myuser/ | |
| chown -R myuser:usergroup /home/myuser/Maildir | |
| chmod -R 700 /home/myuser/Maildir |
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
| sudo add-apt-repository ppa:fcitx-team/nightly |
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
| sudo aptitude purge ~ilinux-image-.*\(\!`uname -r`\) |
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
| <?php | |
| mb_internal_encoding("UTF-8"); | |
| $desc = <<<TEXT | |
| <p>Lines of text SHOULD NOT be longer than 75 octets, (och hör på den) excluding the line break. Long content lines SHOULD be split into a multiple line representations using a line "folding" technique.</p> | |
| That is, a long line can be split between any two characters by inserting a CRLF | |
| immediately followed by a single linear white space character (i.e., | |
| SPACE, <b>US-ASCII</b> decimal 32 or HTAB, US-ASCII decimal 9). Any sequence | |
| of CRLF followed immediately by a single linear white space character | |
| is ignored (i.e., removed) when processing the content type. |