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
#!/bin/bash | |
function abort() { | |
echo "ERROR: $1" | |
echo "" | |
echo "USAGE: $0 /path/to/hg/repo /path/to/new/repo" | |
exit 1 | |
} | |
[ $# -eq 2 ] || abort "Invalid parameters count" | |
[ -d $1 ] || abort "$1 should be an existing hg repository" |
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
$ cat my/repository/.hg/branch | |
default | |
$ curl https://gist.github.com/matiasgarciaisaia/6903416/raw/hg-to-git.sh -o hg-to-git.sh | |
$ chmod +x hg-to-git.sh | |
$ [ -d new-repository ] || echo "new-repository does not exist" | |
new-repository does not exist | |
$ ./hg-to-git.sh my/repository/ new-repository | |
## [ ... tons of output ... ] | |
$ cd new-repository | |
$ git branch | grep \* |
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
#!/bin/sh | |
# | |
# A simple hook to prevent commits adding Ruby string interpolations | |
# in single quotes, that will fail. | |
if git rev-parse --verify HEAD >/dev/null 2>&1 | |
then | |
against=HEAD | |
else | |
# Initial commit: diff against an empty tree object |
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
$ node server.js | |
binding SSDP to port 2503 | |
discovering all IPs from lo0 | |
discovering all IPs from en1 | |
discovering all IPs from vboxnet1 | |
relevant IPs { '192.168.0.130': null, '192.168.59.3': null } | |
no settings file found, will only use default settings | |
notification server listening on port 3500 | |
no preset file, ignoring... | |
http server listening on port 5005 |
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 lunrIndex = null; | |
var lunrData = null; | |
// Download index data | |
$.ajax({ | |
url: '/index.json', | |
cache: true, | |
method: 'GET', | |
success: function(data) { | |
lunrData = 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
HTTP GET http://bundler.rubygems.org/api/v1/dependencies | |
HTTP 200 OK | |
Fetching gem metadata from http://rubygems.org/ | |
Query List: ["middleman", "middleman-livereload", "middleman-blog", "middleman-blog-drafts", "builder", "nokogiri", "wdm", "middleman-s3_sync", "middleman-build-reporter", "pry-debugger", "middleman-alias", "middleman-sitemap", "middleman-sitemap-ping", "middleman-syntax", "redcarpet", "ruby18_source_location", "inifile", "middleman-search"] | |
Query Gemcutter Dependency Endpoint API: middleman,middleman-livereload,middleman-blog,middleman-blog-drafts,builder,nokogiri,wdm,middleman-s3_sync,middleman-build-reporter,pry-debugger,middleman-alias,middleman-sitemap,middleman-sitemap-ping,middleman-syntax,redcarpet,ruby18_source_location,inifile,middleman-search | |
HTTP GET http://bundler.rubygems.org/api/v1/dependencies?gems=middleman,middleman-livereload,middleman-blog,middleman-blog-drafts,builder,nokogiri,wdm,middleman-s3_sync,middleman-build-reporter,pry-debugger,middleman-alias,middleman-sitemap,midd |
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 'sinatra' | |
require 'tempfile' | |
set :bind, '0.0.0.0' | |
get '/' do | |
source_url = params['q'] | |
puts "Downloading #{source_url} ..." | |
system("wget -nc #{source_url}") |
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
FROM crystallang/crystal:0.19.2 | |
# Install crystal deps | |
ADD shard.yml /app/ | |
ADD shard.lock /app/ | |
WORKDIR /app | |
RUN crystal deps | |
# Add app and build it | |
ADD . /app |
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
user@MSEDGEWIN10:/mnt/c/Windows/System32$ sudo apt-get install crystal | |
sudo: unable to resolve host MSEDGEWIN10 | |
Reading package lists... Done | |
Building dependency tree | |
Reading state information... Done | |
The following packages were automatically installed and are no longer required: | |
libfreetype6 os-prober | |
Use 'apt-get autoremove' to remove them. | |
The following NEW packages will be installed: |
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
user@MSEDGEWIN10:/mnt/c/Windows/System32$ sudo apt-get install crystal | |
sudo: unable to resolve host MSEDGEWIN10 | |
Reading package lists... Done | |
Building dependency tree | |
Reading state information... Done | |
The following packages were automatically installed and are no longer required: | |
libfreetype6 os-prober | |
Use 'apt-get autoremove' to remove them. | |
The following NEW packages will be installed: |
OlderNewer