Skip to content

Instantly share code, notes, and snippets.

View idleberg's full-sized avatar

Jan T. Sott idleberg

View GitHub Profile
<?php
session_start();
if (isset($_GET["locale"])) {
$locale = $_GET["locale"];
} else if (isset($_SESSION["locale"])) {
$locale = $_SESSION["locale"];
} else {
$locale = "en_US";
@idleberg
idleberg / sublime-npm.py
Last active November 17, 2015 15:48
Install npm dependencies (global) for Sublime Packages, e.g. linters
# https://gist.github.com/idleberg/ca5714fd2b9607db02b8
import os, sublime, sublime_plugin, subprocess
# Array of required Node packages
packages = [
''
]
def plugin_loaded():
@idleberg
idleberg / sublime-brew.py
Last active November 17, 2015 15:49
Install Brew dependencies for Sublime Packages, e.g. linters
# https://gist.github.com/idleberg/df8f04ec04d2b523d5ff
import os, sublime, sublime_plugin, subprocess
# Array of required Brew packages
packages = [
''
]
def plugin_loaded():
@idleberg
idleberg / spotlight_indexing.md
Last active December 15, 2015 01:55
Enable Spotlight indexing for drives

Enable Spotlight indexing for volumes (network shares, external disks, etc.) in Terminal

# enable indexing
mdutil /Volumes/name -i on

# disable indexing
mdutil /Volumes/name -i off

# check indexing status
-----BEGIN PGP PUBLIC KEY BLOCK-----
Version: OpenPGP.js v.1.20130420
Comment: http://openpgpjs.org
xsFNBFIrew8BD/9gyeftvnJTVFxwXmalP8oLA61knC0BkaPSC7joqoghHML4
XwVhPwGbrhFb03m8P26Hef0+IoCJBtpbtDhP/8AOzWBp26oM2t0X8hn1tcUF
AL89AOTzZrbY9BZMO26MUxVpom8dVk5DttFfCgnSQen3g1c4+Ad57LlE4fG5
tGt3R9akHMWP3QHCYw7Ik5CnEUQL7AtMzW/baCYuTUUy03v03F5gL2rVXv8x
TNPad8ICLm1/Xc28nJUu1WmQXegUiw2cuwnVv8ycLhYGd5ls41kqWzGorhsr
DZkktB4H81bhgHq3NJEZFmN95aN4Aw4z5V1+wyKebo+fjeRgzIQRULD5BK7U
@idleberg
idleberg / iscc
Created May 18, 2016 10:31 — forked from derekstavis/iscc
Compile InnoSetup scripts on unices
#!/bin/sh
# For installation and usage, please refer to my blog post:
# http://derekstavis.github.io/posts/creating-a-installer-using-inno-setup-on-linux-and-mac-os-x/
#
# The MIT License (MIT)
#
# Copyright (c) 2014 Derek Willian Stavis
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
@idleberg
idleberg / atomizr_features.md
Last active March 24, 2017 06:33
Atomizr Feature Comparison
Functionality [Ruby][1] [Node][2] [Atom][3] [Sublime Text][4]
Atom to Sublime Text                     ✓       ✓      
Atom to TextMate
Atom to Visual Studio Code
Sublime Text to Atom
Sublime Text to TextMate
Sublime Text to Visual Studio Code
TextMate to Atom
TextMate to Sublime Text
@idleberg
idleberg / pynsist.sublime-build
Created July 22, 2017 11:48
Pynsist build file for Sublime Text
{
"selector": "source.ini",
"cmd": ["pynsist", "$file"],
"variants": [
{ "name": "No MakeNSIS",
"cmd": ["pynsist", "--no-makensis", "$file"]
}
]
}
@idleberg
idleberg / gulp.sh
Created September 11, 2017 06:57
Spawn Gulp in sub-folder relative to Git root
#!/bin/sh
GIT_ROOT="$(git rev-parse --show-toplevel)"
DIRECTORY="$GIT_ROOT/path/to/subfolder"
printf "Spawning gulp in \"$DIRECTORY\"\n\n"
gulp --cwd "$DIRECTORY" $@
@idleberg
idleberg / build_scummc.sh
Created November 14, 2017 22:21
Build ScummC on macOS
# Pre-requisites
brew install bison
brew link bison --force
# Clone ScummC
git clone https://github.com/AlbanBedel/scummc
cd scummc
# Build
./configure