brew install git bash-completion
Configure things:
git config --global user.name "Your Name"
git config --global user.email "[email protected]"
<?php | |
/** | |
* | |
* This is a quick way to turn a simple text file | |
* with a list of urls in a text file (sitemap-urls.txt) | |
* into a valid XML Sitemap: | |
* http://en.wikipedia.org/wiki/Sitemaps | |
* Put this file sitemap.xml.php and sitemap-urls.txt at | |
* the webroot http://example.com/sitemap.xml.php |
# Two things are important to note: | |
# | |
# 1) The code is fugly, because it was a JavaScript/iPad experiment. | |
# I know that it is ugly, so pretty please don't comment on that part. | |
# 2) I tried to use as many CoffeeScript features as possible, | |
# including but not limited to list comprehensions, | |
# heredocs, destructuring assignment and also the "do" operator | |
# | |
# I welcome comments about stuff that is not CoffeeScripty enough, or what I should | |
# write differently. |
brew install git bash-completion
Configure things:
git config --global user.name "Your Name"
git config --global user.email "[email protected]"
protected override void RequestStartup(ILifetimeScope requestContainer, IPipelines pipelines, NancyContext context) | |
{ | |
pipelines.OnError.AddItemToEndOfPipeline((z, a) => | |
{ | |
log.Error("Unhandled error on request: " + context.Request.Url + " : " + a.Message, a); | |
return ErrorResponse.FromException(a); | |
}); | |
base.RequestStartup(requestContainer, pipelines, context); | |
} |
NSMutableURLRequest *request = [[NSMutableURLRequest alloc] initWithURL:[NSURL URLWithString:@"REST URL PATH"]]; | |
NSData *imageData = UIImageJPEGRepresentation(image, 1.0); | |
[request setCachePolicy:NSURLRequestReloadIgnoringLocalCacheData]; | |
[request setHTTPShouldHandleCookies:NO]; | |
[request setTimeoutInterval:60]; | |
[request setHTTPMethod:@"POST"]; | |
NSString *boundary = @"unique-consistent-string"; |
wget http://download.mono-project.com/repo/xamarin.gpg | |
sudo apt-key add xamarin.gpg | |
echo "deb http://download.mono-project.com/repo/debian wheezy main" | sudo tee --append /etc/apt/sources.list.d/mono-xamarin.list | |
sudo apt-get update | |
sudo apt-get install mono-complete | |
sudo certmgr -ssl -m https://go.microsoft.com | |
sudo certmgr -ssl -m https://nugetgallery.blob.core.windows.net | |
sudo certmgr -ssl -m https://nuget.org | |
mozroots --import --sync |
// optimized to find a vertical barcode in an image | |
// inspired by http://www.pyimagesearch.com/2014/11/24/detecting-barcodes-images-python-opencv/ | |
using System; | |
using System.Drawing; | |
using System.Windows.Forms; | |
using OpenCvSharp; | |
using OpenCvSharp.Extensions; | |
namespace LocateBarcode |
# Add the alias below to ~/.bash_profile on a Mac | |
# Save the file and run: source ~/.bash_profile | |
alias code='open $@ -a "Visual Studio Code"' |
# This file was updated in order to support OpenCV v.3. (note lines 13, 14, 33, 43) | |
# import the necessary packages | |
import numpy as np | |
import cv2 | |
def detect(image): | |
# convert the image to grayscale | |
gray = cv2.cvtColor(image, cv2.COLOR_BGR2GRAY) |
const http = require('http'); | |
const url = require('url'); | |
const fs = require('fs'); | |
const path = require('path'); | |
const port = process.argv[2] || 9000; | |
http.createServer(function (req, res) { | |
console.log(`${req.method} ${req.url}`); | |
// parse URL |