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
import SpriteKit | |
import AVFoundation | |
class GameScene: SKScene { | |
// Create a ball node | |
let ball = SKShapeNode(circleOfRadius: 10) | |
// Create player paddles | |
let player1 = SKShapeNode(rectOf: CGSize(width: 10, height: 50)) | |
let player2 = SKShapeNode(rectOf: CGSize(width: 10, height: 50)) | |
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
addEventListener("fetch", (event) => { | |
const response = new Response("🦕 are back !", { | |
headers: { "content-type": "text/plain; charset=UTF-8" }, | |
}); | |
event.respondWith(response); | |
}); |
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
//// | |
// Example (square) matrices | |
//// | |
// 1x1 | |
const M1 = [ | |
[ 4 ], | |
]; | |
const M2 = [ |
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 | |
set -o nounset | |
set -o errexit | |
set -o pipefail | |
# Ensure hardlink exists | |
if ! [ $(hardlink --help &> /dev/null; echo $?) = "1" ]; then | |
echo "hardlink command seems to be missing" | |
echo "Please install it" |
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
package main | |
import ( | |
"fmt" | |
"os" | |
"github.com/fsouza/go-dockerclient" | |
) | |
func main() { |
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
# hash returns a string representation of a function's arguments | |
# so that we can use that as a key | |
def hash(args): | |
return ":".join(map(str, args)) | |
def memoize(fn): | |
cache = {} | |
def memoized_fn(*args): | |
hashed = hash(args) | |
if hashed in cache: |
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 | |
git branch --merged | grep -v "*" | grep -v master | grep -v gh-pages | xargs git branch -d |
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
{ | |
"links": { | |
"sharing": { | |
"all": false | |
} | |
} | |
} |
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 _ = require('lodash'); | |
var testNumbers = [ | |
'0', | |
'0.1', | |
'0.2', | |
'1', | |
'1.4', | |
'1.9.4', | |
'1.11.4', |
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
{ | |
"ok": false, | |
"errCode": 11000, | |
"errMsg": "E11000 duplicate key error index: gitbook.reviews.$book_1_author_1 dup key: { : ObjectId('536d14de82d0c0b66d183dee'), : ObjectId('536d144282d0c0b66d183ded')", | |
"n": 0 | |
} |
NewerOlder