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
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
# 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 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) | |
{ |
A quick overview of the node.js streams interface with basic examples.
This is based on @brycebaril's presentation, Node.js Streams2 Demystified
Streams are a first-class construct in Node.js for handling data.
Think of them as as lazy evaluation applied to data.
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. |
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
// to compile (using mingw-w64) | |
// g++ this_filename.c -lole32 | |
// outputs current system volume (out of 0-100) to stdout, ex: output "23" | |
// mostly gleaned from examples here: http://msdn.microsoft.com/en-us/library/windows/desktop/dd370839(v=vs.85).aspx | |
// download a compiled version here: | |
// https://sourceforge.net/projects/mplayer-edl/files/adjust_get_current_system_volume_vista_plus.exe.exe (updated, can set it too now!) | |
#include <windows.h> | |
#include <commctrl.h> | |
#include <mmdeviceapi.h> | |
#include <endpointvolume.h> |
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
find . -type d -empty -exec touch {}/.gitkeep \; |
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
{ | |
"directory": "components" | |
} |
NewerOlder