Start with:
FORMAT: 1A
git config --global --add alias.pretty "log --oneline --abbrev-commit --branches=* --graph --decorate" |
// generic type: | |
public class Bag<T> {} | |
// simple usage: | |
Bag<Fruit> myBag; | |
myBag = new Bag<Fruit>(); | |
// so far so good |
{ | |
// ... | |
Competition: '', | |
Participants: [ | |
{ | |
Name: "Manchester United", | |
Players: [ | |
{ | |
Name: "Fred Fredfredfred", | |
ShortName: "Fred", |
Response.Cache.SetExpires(DateTime.UtcNow.AddDays(-1)); | |
Response.Cache.SetValidUntilExpires(false); | |
Response.Cache.SetRevalidation(HttpCacheRevalidation.AllCaches); | |
Response.Cache.SetCacheability(HttpCacheability.NoCache); | |
Response.Cache.SetNoStore(); |
#!/bin/bash | |
# set this to the problem folder | |
BASE=/c/Users/ndc/Dropbox/projects/delete-me | |
cd $BASE | |
for i in `find $BASE -depth` | |
do | |
DIR=`dirname $i` | |
FILE=`basename $i` |
package main | |
import ( | |
"fmt" | |
"math" | |
) | |
func Sqrt(x float64) (float64, int) { | |
last := 0.0 | |
z := 1.0 |
Deleting a tree of folders using rimraf can be pretty fraught on MS Windows; the OS itself can lock files randomly, and there may be various processes getting in the way, like virus checkers or cloud file syncing apps. rimraf
itself will do an exponential-backoff-and-retry for EBUSY
and ENOTEMPTY
errors on Windows, but you can still see EPERM
and others. If you want to do exponential-backoff-and-retry for any error, see the below recipe, using node-retry.
@echo off | |
rem If Windows's idea of $HOME is wrong for you, you can use | |
rem Console2 and instead of using bash directly, use this batch | |
rem file instead. It will set $HOME to wherever it is located. | |
set PATH=%PATH%;%~dp0 | |
set HOME=%~dp0 | |
rem adjust path to suit |
/* | |
* requireTime.js | |
* | |
* require()s every thing in your node_modules and tells you how long each one | |
* took. | |
* | |
* USAGE: | |
* $ cd your_project_folder | |
* $ node loadTest.js | |
* |