Skip to content

Instantly share code, notes, and snippets.

View edoardoc's full-sized avatar

Edoardo Ceccarelli edoardoc

View GitHub Profile
/System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/LaunchServices.framework/Versions/A/Support/lsregister -dump | grep -B6 bindings:.*:
@cabeca
cabeca / simulator_populator_xcode7
Last active April 16, 2020 09:18
This script removes and recreates all simulators in Xcode 7.
#!/usr/bin/env ruby
require 'JSON'
device_types = JSON.parse `xcrun simctl list -j devicetypes`
runtimes = JSON.parse `xcrun simctl list -j runtimes`
devices = JSON.parse `xcrun simctl list -j devices`
devices['devices'].each do |runtime, runtime_devices|
runtime_devices.each do |device|
@edoardoc
edoardoc / plpgsql_query_function_template.sql
Created December 10, 2021 16:53
PL/pgSQL Template to run inline a complicated function and get results in console
-- PL/pgSQL Template to run inline a complicated function and get results in console
DO $$
DECLARE
-- ADD QUERY DECLARATION HERE:
filteringIdOfSomeKind UUID;
-- ADD QUERY DECLARATION HERE -- END!
t timestamptz;
target record;
@bittner
bittner / gnu-tools-for-mac.sh
Last active December 11, 2021 20:05
Cross-OS compatibility with GNU tools (readlink, sed, zcat, zless, zdiff, ...) for Mac OS X towards Linux
# DESCRIPTION OF PROBLEM: Implementations of sed, readlink, zcat, etc. are different on OS X and Linux.
# NOTE: Put this on top of your script using sed, readlink, zcat, etc. that should work alike on Mac OS X.
# cross-OS compatibility (greadlink, gsed, zcat are GNU implementations for OS X)
[[ `uname` == 'Darwin' ]] && {
which greadlink gsed gzcat > /dev/null && {
unalias readlink sed zcat
alias readlink=greadlink sed=gsed zcat=gzcat
} || {
echo 'ERROR: GNU utils required for Mac. You may use homebrew to install them: brew install coreutils gnu-sed'
Project # of Top 100 Free Apps (US)
facebook-ios-sdk 67
Bolts-iOS 48
AFNetworking 39
Google-Mobile-Ads-SDK 38
Reachability (Apple) 38
Crashlytics 37
Flurry-iOS-SDK 31
CocoaPods 30
GoogleConversionTracking 29
@nickrw
nickrw / volsay.sh
Created April 19, 2013 12:43
volsay: Wrapper around OSX's `say' command, which sets the system volume to the requested level, then restores volume / mute state once speech is complete.
#!/bin/bash
function usage() {
echo "usage: $0 <volume (0-100)> <say args...>"
echo
echo "Unmutes and sets the system volume to volume%, passing the remaining"
echo "arguments to the OSX \`say' command, restoring volume / mute setting"
echo "to previous values after the speech has completed."
exit 1
}
@stepney141
stepney141 / BookmarkAPI_en.md
Last active April 4, 2023 01:45
(DEPRECATED) Twitter Undocumented Endpoints for Bookmark
@tonysneed
tonysneed / Mac OS X: Open in Visual Studio Code
Last active March 27, 2024 10:02
Add a command to Finder services in Mac OSX to open a folder in VS Code
- Open Automator
- File -> New -> Service
- Change "Service Receives" to "files or folders" in "Finder"
- Add a "Run Shell Script" action
- Change "Pass input" to "as arguments"
- Paste the following in the shell script box: open -n -b "com.microsoft.VSCode" --args "$*"
- Save it as something like "Open in Visual Studio Code"
@patrickhammond
patrickhammond / android_instructions.md
Last active March 29, 2024 20:14
Easily setup an Android development environment on a Mac

Here is a high level overview for what you need to do to get most of an Android environment setup and maintained.

Prerequisites (for Homebrew at a minimum, lots of other tools need these too):

  • XCode is installed (via the App Store)
  • XCode command line tools are installed (xcode-select --install will prompt up a dialog)
  • Java

Install Homebrew:

ruby -e "$(curl -fsSL https://raw.github.com/Homebrew/homebrew/go/install)"

@ascendbruce
ascendbruce / README.md
Last active April 21, 2024 17:30
Use macOS-style shortcuts in Windows

Use macOS-style shortcuts in Windows / keyboard mappings using a Mac keyboard on Windows

ℹ️ There is a newer alternative project that does similar things and more, check it out at https://github.com/stevenilsen123/mac-keyboard-behavior-in-windows

Make Windows PC's shortcut act like macOS (Mac OS X) (using AutoHotkey (ahk) script)

With this AutoHotKey script, you can use most macOS style shortcuts (eg, cmd+c, cmd+v, ...) on Windows with a standard PC keyboard.

How does it work