Skip to content

Instantly share code, notes, and snippets.

@linniksa
linniksa / defaults-export.zsh
Last active March 10, 2024 19:27 — forked from inoperable/defaults-export.zsh
export defaults for all domains in macOS into separate .plist files for editing and importing, files are written into $HOME/defaults
#!/usr/bin/env zsh
set -e
function exportDefaults {
local outdir="$HOME/defaults"
local outdirApple="$outdir/apple"
local outdirUser="$outdir/user"
local outdirGlobal="$outdir/global"
local filesdone=0
@linniksa
linniksa / git-branch-status
Created May 20, 2015 10:18
Show status of locacal vs remote branches
#!/bin/bash
# git-branch-status
# * originally by http://github.com/jehiah
# * "s'all good!" message by http://github.com/kd35a
# * ANSI colors by http://github.com/knovoselic
# * column formatting and filters by http://github.com/bill-auger
# this script prints out pretty git branch sync status reports
@linniksa
linniksa / composer.json
Created August 25, 2014 09:35
test symfony expression language perfomance
{
"require": {
"symfony/expression-language": "2.4.*",
"symfony/doctrine-bridge": "2.4.*"
}
}
@linniksa
linniksa / FormUtil.php
Created August 18, 2012 14:59
speed up singularify
<?php
/*
* This file is part of the Symfony package.
*
* (c) Fabien Potencier <[email protected]>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
@linniksa
linniksa / test.php
Created August 18, 2012 13:32
test guess method
<?php
class Guess {
private $value;
public function __construct($t) {
$this->value = $t;
}
public function getConfidence() {
return $this->value;