This file contains 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
// before | |
{ 'content[title]': 'test', | |
'content[excerpt]': 'test', | |
'content[content]': 'test', | |
'content[featuredImage][title]': 'test', | |
'content[source][title]': 'test', | |
'content[source][url]': 'http://google.com', | |
'content[source][author]': 'test', | |
'content[source][publishedAt]': '25/07/2014', | |
'content[topics]': '539f11bcfdf15258000d9922' } |
This file contains 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
var nodemailer = require('nodemailer'), | |
env = require('../env'); | |
var Service = module.exports = function () {}; | |
Service.prototype.sendByCurrentUserEmailAccount = function(opt, user) { | |
var smtpTransport = nodemailer.createTransport('SMTP', { | |
service: 'Gmail', | |
auth: { | |
XOAuth2: { |
This file contains 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
^(?!One|Two|Four)+.* |
This file contains 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
curl -H "Content-Type: application/json" -d '{ "field": "value" }' http://someurl.com |
This file contains 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
<snippet> | |
<content><![CDATA[ | |
console.log(${1:'\n---->${2}', }require('util').inspect(${3:arguments}, { depth: null, colors: true })); | |
]]></content> | |
<tabTrigger>inspect</tabTrigger> | |
<scope>source.js</scope> | |
<description>nodejs - util.inspect</description> | |
</snippet> |
This file contains 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
if (typeof x !=== 'undefined' && x !=== '') { | |
// not emtpy | |
} |
This file contains 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 | |
""" | |
Check all existing Docker containers for their mapped paths, and then purge any | |
zombie directories in docker's volumes directory which don't correspond to an | |
existing container. | |
""" | |
import logging | |
import os | |
import sys |
This file contains 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
ZSH_THEME_GIT_PROMPT_PREFIX="%{$reset_color%}%{$FG[245]%}git:(" | |
ZSH_THEME_GIT_PROMPT_SUFFIX="%{$FG[245]%})%{$reset_color%} " | |
ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[red]%}●%{$reset_color%}" | |
ZSH_THEME_GIT_PROMPT_CLEAN="" | |
ZSH_THEME_SVN_PROMPT_PREFIX=$ZSH_THEME_GIT_PROMPT_PREFIX | |
ZSH_THEME_SVN_PROMPT_SUFFIX=$ZSH_THEME_GIT_PROMPT_SUFFIX | |
ZSH_THEME_SVN_PROMPT_DIRTY=$ZSH_THEME_GIT_PROMPT_DIRTY | |
ZSH_THEME_SVN_PROMPT_CLEAN=$ZSH_THEME_GIT_PROMPT_CLEAN | |
vcs_status() { |
This file contains 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/docker run \ | |
--restart=always \ | |
-d \ | |
--name logs-elasticsearch_1 \ | |
-v /data/logs_elasticsearch/config:/usr/share/elasticsearch/config -v /data/logs_elasticsearch/data:/usr/share/elasticsearch/data \ | |
-p 172.17.42.1:9200:9200 -p 172.17.42.1:9300:9300 \ | |
elasticsearch:1.5.0 | |
/usr/bin/docker run \ |
This file contains 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
for file in *.html; do; mv "$file" "${file%.html}.txt"; done |