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
root@dnsfreebsd:~/npm [master]# node cli.js config set loglevel verbose | |
npm info it worked if it ends with ok | |
npm info version 0.1.27-12 | |
npm info config set loglevel verbose | |
npm ok | |
root@dnsfreebsd:~/npm [master]# make install | |
node cli.js install npm | |
npm info it worked if it ends with ok | |
npm verb cli [ 'install', 'npm' ] | |
npm info version 0.1.27-12 |
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
(...) | |
npm info install npm@0.1.27-12 | |
npm ERR! Failed unpacking the tarball. | |
npm ERR! This is very rare. Perhaps the 'gzip' or 'tar' configs | |
npm ERR! are set improperly? | |
npm ERR! | |
npm ERR! install failed Error: Failed gzip "--decompress" "--stdout" "/home/node/.node_libraries/.npm/.cache/npm/0.1.27-12/package.tgz" | |
npm ERR! install failed exited with 1 | |
npm ERR! install failed at ChildProcess.<anonymous> (/usr/home/marcin/npm/lib/utils/exec.js:41:19) | |
npm ERR! install failed at ChildProcess.emit (events:33:26) |
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
/** | |
* BEM Mixin for Sass (v3.4.0) | |
* | |
* Block / Element / Modifier | |
* | |
* Example: | |
* | |
* @include b(test) { | |
* background: red; | |
* @include e(element){ |
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
# https://github.com/jgm/pandoc/releases/1.14.0.1 | |
pandoc -V geometry:"top=1.5cm, bottom=1.5cm, left=1.5cm, right=1.5cm" --latex-engine=xelatex *.md -o out.pdf |
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
# http://stackoverflow.com/a/29490456 | |
#!/bin/bash | |
# Uninstall node.js | |
# | |
# Options: | |
# | |
# -d Actually delete files, otherwise the script just _prints_ a command to delete. | |
# -p Installation prefix. Default /usr/local | |
# -f BOM file. Default /var/db/receipts/org.nodejs.pkg.bom |
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 ruby | |
# USAGE: | |
# sudo port install pwgen | |
# bundle exec ruby script/dev/bash_friendly_password.rb nil 49 | |
def bash_friendly_password(password=nil, length=128) | |
password ||= `pwgen -syv #{length} 1` | |
password.size.times do |i| | |
password = password. |
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 ruby | |
require 'dotenv' | |
Dotenv.load | |
require 'redis' | |
# USAGE: | |
# Put credentials in .env file, wrapped in single quotes. DO NOT COMMMIT this file to git! | |
# Wrap values in single quotes and escape all quotes inside strings with \. | |
# bundle exec ruby script/dev/example_redis-rb.rb |
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 ruby | |
require 'dotenv' | |
Dotenv.load | |
require 'aws-sdk' | |
# USAGE: | |
# Put credentials in .env file, wrapped in single quotes. DO NOT COMMMIT this file to git! | |
# Wrap values in single quotes and escape all quotes inside strings with \. | |
# bundle exec ruby script/dev/example_s3.rb |
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
class Comment < ActiveRecord::Base | |
delegate :email, to: author, prefix: true, allow_nil: true | |
end |
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
# https://medium.com/rubyinside/asynchronous-elasticsearch-bulk-reindexing-with-rails-searchkick-and-sidekiq-26f2f9aa8513 | |
# https://github.com/ankane/searchkick | |
# 2.3.2 [unreleased] | |
# - Added wait option to async reindex | |
# Searchkick.reindex(async: {wait: true}) | |
# This code has been ported to searchkick. | |
require 'sidekiq/api' | |
# BulkReindexer | |
module BulkReindexer |
OlderNewer