As configured in my dotfiles.
start new:
tmux
start new with session name:
from selenium import selenium | |
from scrapy.spider import BaseSpider | |
from scrapy.http import Request | |
import time | |
import lxml.html | |
class SeleniumSprider(BaseSpider): | |
name = "selenium" | |
allowed_domains = ['selenium.com'] | |
start_urls = ["http://localhost"] |
#!/bin/sh | |
set -e | |
# Example init script, this can be used with nginx, too, | |
# since nginx and unicorn accept the same signals | |
# Feel free to change any of the following variables for your app: | |
TIMEOUT=${TIMEOUT-60} | |
APP_ROOT=/path/to/your/app/current | |
PID=$APP_ROOT/tmp/pids/unicorn.pid | |
ENVIRONMENT=production |
class Respond extends Service[Request, Response] with Logger { | |
def apply(request: Request) = { | |
try { | |
request.method -> Path(request.path) match { | |
case GET -> Root / "todos" => Future.value { | |
val data = Todos.allAsJson | |
debug("data: %s" format data) | |
Responses.json(data, acceptsGzip(request)) | |
} | |
case GET -> Root / "todos" / id => Future.value { |
[tox] | |
envlist=py27,lint | |
[testenv] | |
downloadcache={homedir}/.pipcache | |
distribute=True | |
sitepackages=False | |
[testenv:py27] | |
deps=nose |
As configured in my dotfiles.
start new:
tmux
start new with session name:
Hi geeks, | |
my rails new version is 3.2.3. | |
if i wanted to create new rails app with older version say 3.0.5, | |
i can create using the command | |
rails _3.0.5_ new app | |
but i was getting an error | |
/usr/local/lib/ruby/site_ruby/1.9.1/rubygems.rb:316:in `bin_path': can't find gem railties (["3.0.5"]) with executable rails (Gem::GemNotFoundException) |
[Unit] | |
Description=Gitlab Resque | |
[Service] | |
Type=forking | |
SyslogIdentifier=gl-resque | |
User=gitlab | |
PIDFile=/home/gitlab/gitlab/tmp/pids/resque_worker.pid | |
WorkingDirectory=/home/gitlab/gitlab |
#!/bin/sh | |
### | |
# SOME COMMANDS WILL NOT WORK ON macOS (Sierra or newer) | |
# For Sierra or newer, see https://github.com/mathiasbynens/dotfiles/blob/master/.macos | |
### | |
# Alot of these configs have been taken from the various places | |
# on the web, most from here | |
# https://github.com/mathiasbynens/dotfiles/blob/5b3c8418ed42d93af2e647dc9d122f25cc034871/.osx |
################################################################## | |
# /etc/elasticsearch/elasticsearch.yml | |
# | |
# Base configuration for a write heavy cluster | |
# | |
# Cluster / Node Basics | |
cluster.name: logng | |
# Node can have abritrary attributes we can use for routing |