Skip to content

Instantly share code, notes, and snippets.

@mohanarpit
mohanarpit / change-author.sh
Created December 6, 2012 11:26
Script to modify the author and commiter name & e-mail ID in the GIT tree
#!/bin/sh
git filter-branch --commit-filter '
if [ "$GIT_COMMITTER_NAME" = "<Old commit name>" ];
then
GIT_COMMITTER_NAME= "<New commit name>";
GIT_AUTHOR_NAME="<New author name>";
GIT_COMMITTER_EMAIL="<New commit email>";
GIT_AUTHOR_EMAIL="<New author email>";
git commit-tree "$@";
else
@alexpacini
alexpacini / markDown.css
Last active March 27, 2016 20:56
Markdown CSS extended from http://kevinburke.bitbucket.org/markdowncss/ to be used with MarkDown Extra on StackEdit
/*
* Copyright 2013 Alex Pacini.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
/*
* Copyright 2013 Alex Pacini.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
8.2.3. HTTP log format
----------------------
The HTTP format is the most complete and the best suited for HTTP proxies. It
is enabled by when "option httplog" is specified in the frontend. It provides
the same level of information as the TCP format with additional features which
are specific to the HTTP protocol. Just like the TCP format, the log is usually
emitted at the end of the session, unless "option logasap" is specified, which
generally only makes sense for download sites. A session which matches the
"monitor" rules will never logged. It is also possible not to log sessions for
@kapad
kapad / screen-man-simple.md
Last active August 1, 2018 21:23
Simplified man page/usage instructions for Linux screen command

Starting or re-entering an already running session (Works regardless of whether the session was detached properly or the internet connection went kaput)

Command: screen -D -RR If multiple users are going to share the same machine and all want to use screen, then use screen -D -RR <screen-alias>

To start with screen will only have one screen.

To start a new screen keyboard shortcut is

@alexpacini
alexpacini / template.html
Last active July 8, 2020 13:46
Custom StackEdit template
<!--
1: Using prettify
-->
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title><%= documentTitle %></title>
@csanz
csanz / using_repl.md
Created August 1, 2011 09:07
Debugging your Mongoose Models Using Repl

Debugging your Mongoose Models Using Repl

This is a faster way to test your mongoose models. The example below was based on the expressjs-blog example here

Example

$node
> var mongoose = require('mongoose')
> var db = mongoose.connect('mongodb://localhost/blogsample')

> db.model('BlogPost', require('./app/models/blogpost'))

@kapad
kapad / dataUriToBinary.js
Created June 13, 2017 07:45
Convert a base64 encoded data URI to binary
let convertDataURIToBinary = (dataURI) => {
var BASE64_MARKER = ';base64,';
var base64Index = dataURI.indexOf(BASE64_MARKER) + BASE64_MARKER.length;
var base64 = dataURI.substring(base64Index);
var raw = window.atob(base64);
var rawLength = raw.length;
var array = new Uint8Array(new ArrayBuffer(rawLength));
for(var i = 0; i < rawLength; i++) {
array[i] = raw.charCodeAt(i);
@romac
romac / Makefile
Created July 15, 2011 13:36
Markdown to PDF
TEMP_DIR:=$(shell mktemp -d -t /tmp)
MARKDOWN=perl Resources/Markdown.pl
WKHTMLTOPDF=/usr/local/bin/wkhtmltopdf
BUILD_DIR=Build
MD_OUTPUT=Documentation.md
HTML_OUTPUT=Documentation.html
PDF_OUTPUT=Documentation.pdf
COVER=__Couverture
8.2.3. HTTP log format
----------------------
The HTTP format is the most complete and the best suited for HTTP proxies. It
is enabled by when "option httplog" is specified in the frontend. It provides
the same level of information as the TCP format with additional features which
are specific to the HTTP protocol. Just like the TCP format, the log is usually
emitted at the end of the session, unless "option logasap" is specified, which
generally only makes sense for download sites. A session which matches the
"monitor" rules will never logged. It is also possible not to log sessions for