Skip to content

Instantly share code, notes, and snippets.

@50percentgrey
50percentgrey / apple.sh
Created January 29, 2020 19:11
Delete-Clean Unnecessary files / Apple / Xcode
#!/bin/bash
# Delete Archived Applications
rm -r ~/Library/Developer/Xcode/Archives/*/
# Delete Devired Data
rm -r ~/Library/Developer/Xcode/DerivedData/*/
# Delete Apple cached files
rm -r ~/Library/Developer/CoreSimulator/Caches/dyld/*/*/
@msurguy
msurguy / User.php
Created June 14, 2013 00:18
Password setter for laravel 4 user model
public function setPasswordAttribute($value)
{
$this->attributes['password'] = Hash::make($value);
}
@ibeex
ibeex / foo.log
Created August 4, 2012 13:46
Flask logging example
A warning occurred (42 apples)
An error occurred
@mjtko
mjtko / handlebarsTemplateEngine.js
Created May 12, 2011 22:39
knockout template engine for handlebars.js
/*
Handlebars Template Engine for Knockout JavaScript library
*//*!
Copyright (c) 2011 Mark J. Titorenko
License: MIT (http://www.opensource.org/licenses/mit-license.php)
*/
ko.handlebarsTemplateEngine = function () {
// adapted from MooTools.Element
//
// This is necessary to allow us to easily deal with table
@danmackinlay
danmackinlay / supervisord.sh
Created August 27, 2009 07:07
an init.d script for supervisord
#! /bin/sh
### BEGIN INIT INFO
# Provides: supervisord
# Required-Start: $remote_fs
# Required-Stop: $remote_fs
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Example initscript
# Description: This file should be used to construct scripts to be
# placed in /etc/init.d.