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
| .. code-block:: javascript | |
| db.runCommand( { aggregate: "records", | |
| pipeline: [ { $project: { amount: | |
| { $eq: [ "$42", { $literal: "$42" } ] } } | |
| } ] } ) |
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
| from unittest import TestCase | |
| from core import ApplicationStage, ApplicationStageAlternate | |
| class StagesBuildStepMultiAddTests(object): | |
| def test_valid_test_harness(self): | |
| self.assertEqual( self.jobs[0][1], 42 ) | |
| class TestStagesBuildStageMultiAdd(StagesBuildStepMultiAddTests, TestCase): | |
| @classmethod |
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
| EMACS_DAEMON=ed | |
| emacs(){ /Applications/Emacs.app/Contents/MacOS/Emacs } | |
| emacs-daemon(){ /Applications/Emacs.app/Contents/MacOS/Emacs --daemon=$EMACS_DAEMON } | |
| eg(){ /Applications/Emacs.app/Contents/MacOS/bin/emacsclient -n -c --server-file=$EMACS_DAEMON $@ } | |
| egt(){ /Applications/Emacs.app/Contents/MacOS/bin/emacsclient -t --server-file=$EMACS_DAEMON $@ } |
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
| (defun notify (msg) | |
| (run-shell-command (format nil "notify-send 'StumpWM' '~a'" msg))) | |
| (defcommand conditional-restore-layout () () | |
| (when (> (list-length (screen-heads (current-screen))) 1) | |
| (restore-desktop-office) | |
| (notify "changed to multihead mode")) | |
| (when (> (list-length (screen-heads (current-screen)) 1) | |
| (restore-desktop-laptop) | |
| (notify "changed to laptop mode")))) |
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
| replica-set-primary-with-two-secondaries | |
| alt: "Diagram of default 3-member replica set architecture." | |
| output: | |
| - type: print | |
| tag: '-print.png' | |
| dpi: 300 | |
| width: 2100 | |
| - type: web | |
| tag: '.png' | |
| dpi: 72 |
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
| BSONObj isWindows(const BSONObj& a, void* data) { | |
| uassert( 13006, "isWindows accepts no arguments", a.nFields() == 0 ); | |
| #ifdef _WIN32 | |
| return BSON( "" << true ); | |
| #else | |
| return BSON( "" << false ); | |
| #endif | |
| } |
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
| The index 1 is too large. | |
| 0: (SB-DEBUG::MAP-BACKTRACE | |
| #<CLOSURE (LAMBDA # :IN SB-DEBUG:BACKTRACE) {B9DB265}> | |
| :START | |
| 0 | |
| :COUNT | |
| 100) | |
| 1: (SB-DEBUG:BACKTRACE 100 #<SB-IMPL::STRING-OUTPUT-STREAM {B9DB211}>) | |
| 2: (STUMPWM::BACKTRACE-STRING) | |
| 3: (STUMPWM::PERFORM-TOP-LEVEL-ERROR-ACTION |
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
| ssh you@yourlinode "wget -O - -q https://api.linode.com/?api_key=$LINODE_API_KEY\&api_action=domain.resource.update\&domainid=$DOMAINID\&resourceid=$RESOURCEID\&target=\`echo \$SSH_CLIENT | cut -d' ' -f1\`" |
NewerOlder