Here is a list of scopes to use in Sublime Text 2/3 snippets -
ActionScript: source.actionscript.2
AppleScript: source.applescript
ASP: source.asp
Batch FIle: source.dosbatch
C#: source.cs
C++: source.c++
Clojure: source.clojure
#[[ -s "$HOME/.rvm/scripts/rvm" ]] && . "$HOME/.rvm/scripts/rvm" | |
eval "$(rbenv init -)" | |
alias json='python -mjson.tool | pygmentize -f terminal256 -l javascript -O style=native' | |
export NODE_PATH=/usr/local/lib/node_modules |
javascript:q=location.href;if(document.getSelection)%7Bd=document.getSelection()+" refrr:"+document.referrer;%7Delse%7Bd='';%7D;p=document.title;void(open('https://pinboard.in/add?showtags=yes&url='+encodeURIComponent(q)+'&description='+encodeURIComponent(d)+'&title='+encodeURIComponent(p),'Pinboard','toolbar=no,scrollbars=yes,width=750,height=700')); |
#!/bin/bash -e | |
# given a commit, find immediate children of that commit. | |
for arg in "$@"; do | |
for commit in $(git rev-parse $arg^0); do | |
for child in $(git log --format='%H %P' --all | grep -F " $commit" | cut -f1 -d' '); do | |
git describe $child | |
done | |
done | |
done |
Available keys for -exportOptionsPlist: | |
compileBitcode : Bool | |
For non-App Store exports, should Xcode re-compile the app from bitcode? Defaults to YES. | |
embedOnDemandResourcesAssetPacksInBundle : Bool | |
For non-App Store exports, if the app uses On Demand Resources and this is YES, asset packs are embedded in the app bundle so that the app can be tested without a server to host asset packs. Defaults to YES unless onDemandResourcesAssetPacksBaseURL is specified. |
Here is a list of scopes to use in Sublime Text 2/3 snippets -
ActionScript: source.actionscript.2
AppleScript: source.applescript
ASP: source.asp
Batch FIle: source.dosbatch
C#: source.cs
C++: source.c++
Clojure: source.clojure
const transitionToPromise = (el, property, value) => | |
new Promise(resolve => { | |
el.style[property] = value; | |
const transitionEnded = e => { | |
if (e.propertyName !== property) return; | |
el.removeEventListener('transitionend', transitionEnded); | |
resolve(); | |
} | |
el.addEventListener('transitionend', transitionEnded); | |
}); |
PASSWORD1 # Replace literal string 'PASSWORD1' with '***REMOVED***' (default) | |
PASSWORD2==>examplePass # replace with 'examplePass' instead | |
PASSWORD3==> # replace with the empty string | |
regex:password=\w+==>password= # Replace, using a regex | |
regex:\r(\n)==>$1 # Replace Windows newlines with Unix newlines |
--Table | |
CREATE TABLE IF NOT EXISTS person ( | |
id integer NOT NULL, | |
person_name character varying(40) NOT NULL, | |
updated_date date, | |
CONSTRAINT person_pkey PRIMARY KEY (id) | |
); | |
--Index | |
CREATE INDEX IF NOT EXISTS idx_person_name ON person (person_name); |
<?xml version="1.0" encoding="utf-8"?> | |
<svg version="1.1" id="Camada_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="500px" height="500px" x="0px" y="0px" viewBox="-220 280 171 233" style="enable-background:new -220 280 171 233;" xml:space="preserve"> | |
<style type="text/css"> | |
#raio{fill:none;stroke:none;} | |
</style> | |
<g> | |
<path id="raio" class="st0" d="M-156.3,491.4l4.3-86.6c0.2-3.4-2.6-6.3-6-6.3h-42.9c-1.9,0-3.3-1.7-2.9-3.6l18.6-97.5c0.3-1.4,1.5-2.4,2.9-2.4 | |
l110.5-1.9c2,0,3.5,1.9,2.9,3.8l-23.8,88.4c-1,3.6,1.6,7.3,5.3,7.5l16.9,1.3c2.5,0.2,3.7,3.1,2,5l-82.6,94.5 | |
C-152.9,495.6-156.4,494.2-156.3,491.4l4.3-86.6c0.2-3.4-2.6-6.3-6-6.3h-42.9c-1.9,0-3.3-1.7-2.9-3.6l18.6-97.5 | |
c0.3-1.4,1.5-2.4,2.9-2.4l110.5-1.9c2,0,3.5,1.9,2.9,3.8l-23.8,88.4c-1,3.6,1.6,7.3,5.3,7.5l16.9,1.3c2.5,0.2,3.7,3.1,2,5 |
I often find myself ssh'ing into my servers and checking my systemd service logs with $ journalctl -f -u {name}.service
. One day I got tired of this and wanted all of my important logs in once place (Amazon AWS Cloudwatch). To my dismay, there weren't any real good tutorials on how to do so. So, voilà.
Overall, it's a fairly simple process consisting of the following few steps.
Open the service file with $ sudo vi /lib/systemd/system/{name}.service
Modify the [Service]
section: