Skip to content

Instantly share code, notes, and snippets.

@martinsik
martinsik / chat-frontend.js
Last active December 19, 2023 10:23
Node.js chat frontend and server
$(function () {
"use strict";
// for better performance - to avoid searching in DOM
var content = $('#content');
var input = $('#input');
var status = $('#status');
// my color assigned by the server
var myColor = false;
@piaoger
piaoger / git-sync-all-branches.sh
Created August 31, 2015 01:34
git-sync-all-branches
# fetch all branches
# From: http://stackoverflow.com/questions/10312521/how-to-fetch-all-git-branches
#!/bin/bash
for branch in `git branch -a | grep remotes | grep -v HEAD | grep -v master`; do
git branch --track ${branch##*/} $branch
done
git fetch --all
@Calinou
Calinou / build_iphone.sh
Last active August 20, 2019 08:33
Compile Godot for iOS easily (from macOS)
#!/bin/sh -x
# This script must be run from a macOS machine with Xcode installed.
# Place this script at the root of your Godot Git clone.
# CC0 1.0 Universal
# Number of CPU threads to use for compilation (no "nproc" on macOS...)
nproc=4