Skip to content

Instantly share code, notes, and snippets.

View famousgarkin's full-sized avatar

Ján Dzurek famousgarkin

View GitHub Profile
@famousgarkin
famousgarkin / powershell-proxy-set-clear.ps1
Last active March 31, 2024 13:55
PowerShell Set-Proxy, Clear-proxy
# NOTE: registry keys for IE 8, may vary for other versions
$regPath = 'HKCU:\Software\Microsoft\Windows\CurrentVersion\Internet Settings'
function Clear-Proxy
{
Set-ItemProperty -Path $regPath -Name ProxyEnable -Value 0
Set-ItemProperty -Path $regPath -Name ProxyServer -Value ''
Set-ItemProperty -Path $regPath -Name ProxyOverride -Value ''
[Environment]::SetEnvironmentVariable('http_proxy', $null, 'User')
cygstart is part of cygutils version 1.4.14
cygstart was originally authored by Michael Schaap
Let Windows start a program or open a file or URL.
Usage: cygstart [OPTION]... FILE [ARGUMENTS]
Action options
-a, --action=STRING Use specified action instead of default
-o, --open Short for: --action open
sublime() {
if [ $1 ]
then
path=`cygpath -wa $1`
fi
cygstart /cygdrive/c/Users/me/PortableApps/Sublime\ Text\ 3/Sublime\ Text\ 3.lnk $path
}
for f in locale/app/*.json; do data=`cat $f`; echo $data | jase premium.window.updateWidget -d -i $'\t' > $f; done
grunt.registerTask('do', function () {
grunt.file.expand(['data/triggers/*.json']).forEach(function (file) {
var locale = path.basename(file, '.json');
var localeData = {};
JSON.parse(grunt.file.read(file)).records.forEach(function (trigger, i) {
localeData[['visit1', 'visit2', 'busy'][i]] = {
name: trigger.name,
description: trigger.description,
message: JSON.parse(trigger.source).actions[0].message
};
@famousgarkin
famousgarkin / Failed global initialization: BadValue Invalid or no user locale set fix.sh
Last active December 1, 2015 09:38
Failed global initialization: BadValue Invalid or no user locale set. Please ensure LANG and, or LC_* environment variables are set correctly.
export LC_ALL=C
- command: which composer
args:
creates: /usr/local/bin/composer
ignore_errors: yes
register: which_composer
- shell: curl -sS https://getcomposer.org/installer | sudo php -- --install-dir=/usr/local/bin --filename=composer
become: yes
when: not which_composer.stdout
var Immutable = require('immutable');
describe('Immutable', function () {
it('can create nested groups', function () {
var items = [
{key1: 'a', key2: 'A'},
{key1: 'a', key2: 'A'},
{key1: 'a', key2: 'B'},
{key1: 'b', key2: 'A'},
{key1: 'b', key2: 'B'}
\Tracy\Debugger::barDump($data);
\Tracy\Debugger::log($data, 'logfilename');
ln -sf "/Applications/Sublime Text.app/Contents/SharedSupport/bin/subl" /usr/local/bin/subl