Skip to content

Instantly share code, notes, and snippets.

View cvgellhorn's full-sized avatar
:electron:
This is the way

Christoph von Gellhorn cvgellhorn

:electron:
This is the way
View GitHub Profile
@cvgellhorn
cvgellhorn / setup.sh
Created June 17, 2024 10:09 — forked from bradp/setup.sh
New Mac Setup Script
echo "Creating an SSH key for you..."
ssh-keygen -t rsa
echo "Please add this public key to Github \n"
echo "https://github.com/account/ssh \n"
read -p "Press [Enter] key after this..."
echo "Installing xcode-stuff"
xcode-select --install
{
"editor.fontSize": 13,
"editor.renderWhitespace": "selection",
"editor.cursorSurroundingLines": 5,
"editor.minimap.showSlider": "always",
"editor.scrollbar.verticalScrollbarSize": 10,
"editor.scrollbar.horizontalScrollbarSize": 10,
"explorer.confirmDragAndDrop": false,
"git.confirmSync": false,
"git.enableSmartCommit": true,
/*!
* Translator util
*/
var Translator = {
data: {},
__: function() {
var args = (arguments.length === 1) ? arguments[0] : arguments;
@cvgellhorn
cvgellhorn / storage_handler.js
Created April 24, 2015 16:11
JS localStorage handler (requirements: underscore.js)
/**
* Set and stringify local storage item(s)
*
* @param {(string|object)} key
* @param {*} value
*/
window.setStorage = function(key, value) {
if (_.isObject(key)) {
_.each(key, function(value, key) {
localStorage.setItem(key, JSON.stringify(value));
@cvgellhorn
cvgellhorn / log.php
Last active August 29, 2015 14:06
Simple PHP log function
<?php
/**
* Write log message
*
* @param string $msg Log message
* @param string $file Filename
* @param bool $append Append or overwrite file
*/
function log_msg($msg, $file = 'application.log', $append = true)