Skip to content

Instantly share code, notes, and snippets.

View idleberg's full-sized avatar

Jan T. Sott idleberg

View GitHub Profile
@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 / in_arrayi.php
Created January 23, 2018 11:48 — forked from sepehr/in_arrayi.php
PHP: Case-insensitive in_array()
<?php
/**
* Case-insensitive in_array() wrapper.
*
* @param mixed $needle Value to seek.
* @param array $haystack Array to seek in.
*
* @return bool
*/
@idleberg
idleberg / auto-deploy.md
Created August 20, 2017 18:16 — forked from domenic/0-github-actions.md
Auto-deploying built products to gh-pages with Travis

Auto-deploying built products to gh-pages with Travis

This is a set up for projects which want to check in only their source files, but have their gh-pages branch automatically updated with some compiled output every time they push.

Create a compile script

You want a script that does a local compile to e.g. an out/ directory. Let's call this compile.sh for our purposes, but for your project it might be npm build or gulp make-docs or anything similar.

The out/ directory should contain everything you want deployed to gh-pages. That almost always includes an index.html.

@idleberg
idleberg / scopes.md
Last active May 30, 2022 18:07 — forked from iambibhas/scopes.txt
List of scopes for Sublime Text and Atom. Follow three simple rules when contributing: 1. Link whenever possible, use atom.io and Package Control links (if possible) 2. Always link third-party packages, use current Markdown link structure 3. Alphabetize!
File type Sublime Text Atom
ActionScript source.actionscript.2 ?
AppleScript source.applescript [.source.applescript]
ASP source.asp ?
Batch File source.dosbatch ?
BibTex source.bibtex ?
BridleNSIS [source.nsis.bridle] [.source.nsis.bridle]
C source.c [.source.c]
C# source.cs [.source.cs]
@idleberg
idleberg / sublime-text-macos-context-menu.md
Last active October 8, 2024 20:09 — forked from vincentmac/sublime-text-osx-context-menu.md
“Open in Sublime Text” in macOS context-menu

This list has been updated for Big Sur (and later). Since I don't use these versions, this guide might still need further improvements. For older macOS versions, please see this older revision.

Open in Sublime Text

  • Open Automator
  • Quick Action
  • Set “Service receives selected” to files or folders in any application
  • Add a Run Shell Script action
  • Set the script action to /Applications/Sublime\ Text.app/Contents/SharedSupport/bin/subl -n "$@"
  • Set “Pass input” to as arguments