start new:
tmux
start new with session name:
tmux new -s myname
require 'net/dns/resolver' | |
# Custom Domain | |
# | |
# Require net-dns gem | |
# | |
# A Rack middleware to to resolve the custom domain to original subdomain | |
# for your multi telent application. | |
# | |
# It's all transperant to your application, it performs cname lookup and |
require 'net/dns/resolver' | |
# Custom Domain | |
# | |
# Require net-dns gem | |
# | |
# A Rack middleware to to resolve the custom domain to original subdomain | |
# for your multi telent application. | |
# | |
# It's all transperant to your application, it performs cname lookup and |
#!/bin/sh | |
# Convert a directory of Notational Velocity notes to a single file of | |
# Emacs org-mode notes. Must be run from within the directory to be | |
# converted. Each entry in the resulting org file will be a 2nd-level | |
# entry ("** ...") whose title is derived from the filename and whose | |
# body contains the file contents. Output is written to stdout. '*' at | |
# the beginning of a line will be converted to '-' to avoid being | |
# confused with an org-mode headline. |
The reason why you might get certificate errors in Ruby 2.0 when talking HTTPS is because there isn't a default certificate bundle that OpenSSL (which was used when building Ruby) trusts.
Update: this problem is solved in edge versions of rbenv and RVM.
$ ruby -rnet/https -e "Net::HTTP.get URI('https://github.com')"
net/http.rb:917:in `connect': SSL_connect returned=1 errno=0 state=SSLv3
read server certificate B: certificate verify failed (OpenSSL::SSL::SSLError)
You can work around the issue by installing a certificate bundle that you trust. I trust Mozilla and curl.
#! /bin/bash | |
# Usage: rot [base] string | |
# | |
# Base is assumed to be 13 if not specified. | |
# | |
# Bases not in 0-25 are taken modulo 26; negatives are increased by | |
# 26es until they're positive. Thus, any integer should work | |
# as expected. |
{ | |
"Statement": [ | |
{ | |
"Sid": "PackerSecurityGroupAccess", | |
"Action": [ | |
"ec2:CreateSecurityGroup", | |
"ec2:DeleteSecurityGroup", | |
"ec2:DescribeSecurityGroups", | |
"ec2:AuthorizeSecurityGroupIngress", | |
"ec2:RevokeSecurityGroupIngress" |
# check if job exists | |
curl -XGET 'http://jenkins/checkJobName?value=yourJobFolderName' --user user.name:YourAPIToken | |
# with folder plugin | |
curl -s -XPOST 'http://jenkins/job/FolderName/createItem?name=yourJobName' --data-binary @config.xml -H "Content-Type:text/xml" --user user.name:YourAPIToken | |
# without folder plugin | |
curl -s -XPOST 'http://jenkins/createItem?name=yourJobName' --data-binary @config.xml -H "Content-Type:text/xml" --user user.name:YourAPIToken | |
# create folder |
#!/bin/sh | |
# | |
# A hook script that checks the length of the commit message. | |
# | |
# Called by "git commit" with one argument, the name of the file | |
# that has the commit message. The hook should exit with non-zero | |
# status after issuing an appropriate message if it wants to stop the | |
# commit. The hook is allowed to edit the commit message file. | |
DEFAULT="\033[0m" |
#!/usr/bin/env python | |
# | |
# Writes task start/stop times to a timelog formatted file. | |
# You might need to adjust LEDGERFILE, or set the TIMELOG environment variable. | |
# | |
# Example reports, after using start/stop on a task: | |
# ledger -f /path/to/timelog.ledger print | |
# ledger -f /path/to/timelog.ledger register | |
# | |
# Projects, tags, and UUIDs are fully supported and queryable from ledger. |