Skip to content

Instantly share code, notes, and snippets.

View Aimeast's full-sized avatar
🙃
There is no typing

Aimeast

🙃
There is no typing
View GitHub Profile
@raecoo
raecoo / console.save.js
Last active August 7, 2024 21:38
Save JSON object to file in Chrome Devtool
// e.g. console.save({hello: 'world'})
(function(console){
console.save = function(data, filename){
if(!data) {
console.error('Console.save: No data')
return;
}
if(!filename) filename = 'console.json'
if(typeof data === "object"){
data = JSON.stringify(data, undefined, 4)
@pwkelley
pwkelley / SmartSubtransportFixture.cs
Created November 12, 2012 01:19
Libgit2sharp bindings for smart protocol subtransports
using System;
using System.Collections.Generic;
using System.IO;
using System.Net;
using LibGit2Sharp.Tests.TestHelpers;
using Xunit;
using Xunit.Extensions;
namespace LibGit2Sharp.Tests
{
@caniszczyk
caniszczyk / git-pre-receive-hook.sh
Created October 31, 2011 13:17
A reasonable git pre-receive-hook
#!/bin/sh
#
# For each ref, validate the commit.
#
# - It disallows deleting branches without a /.
# - It disallows non fast-forward on branches without a /.
# - It disallows deleting tags without a /.
# - It disallows unannotated tags to be pushed.