See
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
# switch npm | |
echo '\n#alias for cnpm\nalias cnpm="npm --registry=registry.npm.taobao.org \ | |
--cache=$HOME/.npm/.cache/cnpm \ | |
--disturl=http://npm.taobao.org/dist \ | |
--userconfig=$HOME/.cnpmrc"' >> ~/.zshrc && source ~/.zshrc | |
#switch Ruby gem | |
gem sources --remove https://rubygems.org/ | |
gem sources -a https://ruby.taobao.org/ |
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 Blitz = require('blitz'); | |
var email = "your@account.com", | |
apiKey = "aqbcdge-sjfkgurti-sjdhgft-skdiues", | |
myWebsite = "http://your.cool.app", | |
blitz= new Blitz(email, apiKey); | |
// Run a sprint | |
blitz.sprint({ | |
steps: [{url: myWebsite}], |
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
Drupal 8.x search_api schema with ICUTokenizerFactory | |
<analyzer type="index"> | |
<charfilter class="solr.HTMLStripCharFilterFactory"/> | |
<charFilter class="solr.MappingCharFilterFactory" mapping="mapping-ISOLatin1Accent.txt"/> | |
<tokenizer class="solr.ICUTokenizerFactory"/> | |
<filter class="solr.StopFilterFactory" | |
ignoreCase="true" | |
words="stopwords.txt" | |
/> | |
<filter class="solr.WordDelimiterFilterFactory" |
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
/* | |
Asymmetric Encryption Sample in Node.js: Encrypt and Decrypt using Password as a key(SECRET_KEY) | |
Algorithm: des-ede3-cbc (Three key Triple-DES EDE in CBC mode) | |
johan@firebase.co | |
@thepumpkin | |
*/ | |
var assert = require('assert') | |
var crypto = require('crypto') | |
var Buffer = require('buffer').Buffer |
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 Util = require('util'); | |
var Https = require('https'); | |
var Tls = require('tls'); | |
/** | |
* HTTPS Agent for node.js HTTPS requests via a proxy. | |
* blog.vanamco.com/connecting-via-proxy-node-js/ | |
*/ | |
function HttpsProxyAgent(options) | |
{ |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Save Generated Data</title> | |
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8"/> | |
<meta http-equiv="X-UA-Compatible" content="IE=edge;chrome=1"/> | |
<script type="text/javascript"> | |
// <![CDATA[ |
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
exports = module.exports | |
exports.setup = (callback) -> | |
write = process.stdout.write | |
process.stdout.write = ((stub) -> | |
(string, encoding, fd) -> | |
stub.apply process.stdout, arguments | |
callback string, encoding, fd)(process.stdout.write) | |
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
<?php // Namespace DB; | |
use Illuminate\Database\Capsule\Manager as Capsule; | |
class Connection { | |
public function __construct() | |
{ | |
$this->capsule = new Capsule; | |
// Same as database configuration file of Laravel. |
OlderNewer