Skip to content

Instantly share code, notes, and snippets.

View utils.js
function capitalizeFirstLetter(string)
{
return string.charAt(0).toUpperCase() + string.slice(1);
}
function moveArrayElement(arr, old_index, new_index) {
while (old_index < 0) {
old_index += arr.length;
}
while (new_index < 0) {
@lukaszgrolik
lukaszgrolik / 0_reuse_code.js
Created Aug 14, 2014
Here are some things you can do with Gists in GistBox.
View 0_reuse_code.js
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
View .gitconfig
[user]
name = lorem
email = ipsum@dolor.sit
[alias]
a = add
b = branch
c = commit
cae = commit --allow-empty
cf = config
cl = clone
@lukaszgrolik
lukaszgrolik / font-weights.md
Last active Nov 18, 2021
Commonly used names for CSS font-weight values
View font-weights.md

unknown source

value name
100 extralight/ultralight
200 light/thin
300 book/demi/light
400 regular/normal
500 medium
600 semibold/demibold
@lukaszgrolik
lukaszgrolik / .bash_profile
Last active Dec 18, 2015
Linux console prompt with git branch
View .bash_profile
# ...
source ~/.bashrc