Skip to content

Instantly share code, notes, and snippets.

@hisaos
hisaos / iphonsimulatorDefaults.sh
Created October 22, 2012 01:55
defaults and com.apple.iphonesimulator
# defaults commands with com.apple.iphonesimulator
# usage in detail will show with `defaults` without any arguments
# this sets default simulator device to iPhone
defaults write com.apple.iphonesimulator SimulateDevice -string "iPhone"
defaults write com.apple.iphonesimulator SimulateSDKRoot -string "${SDKROOT_iphonesimulator}"
# this sets default simulator device to iPad
defaults write com.apple.iphonesimulator SimulateDevice -string "iPad"
defaults write com.apple.iphonesimulator SimulateSDKRoot -string "${SDKROOT_iphonesimulator_ipad}"
@staltz
staltz / introrx.md
Last active July 22, 2024 09:31
The introduction to Reactive Programming you've been missing
@charithe
charithe / curry.exs
Created January 4, 2015 15:10
Elixir Currying With Macros
defmodule Curry do
defmacro defcurry({func_name, _func_ctx, args}, do: body) do
num_args = Enum.count(args)
if num_args - 1 >= 1 do
new_args = Enum.take(args, num_args - 1)
quote do
def unquote(func_name)(unquote_splicing(args)) do
unquote(body)
end
@HyperBrain
HyperBrain / lifecycle-cheat-sheet.md
Last active July 19, 2024 19:37
Serverless Lifecycle Cheat Sheet

Serverless plugin author's cheat sheet

This cheat sheet provides a detailed overview of the exposed lifecycle events and available commands (and entrypoints) of the Serverless framework, that can be hooked by plugins (internal and external ones). The document is structured by the commands invoked by the user.

Lifecycle events are shown as the globally available outer events (all providers) and sub lifecycle events that are provider specific in the called order. Currently only the AWS provider is shown. If you have information about the other provider,

@mbinna
mbinna / effective_modern_cmake.md
Last active July 20, 2024 22:17
Effective Modern CMake

Effective Modern CMake

Getting Started

For a brief user-level introduction to CMake, watch C++ Weekly, Episode 78, Intro to CMake by Jason Turner. LLVM’s CMake Primer provides a good high-level introduction to the CMake syntax. Go read it now.

After that, watch Mathieu Ropert’s CppCon 2017 talk Using Modern CMake Patterns to Enforce a Good Modular Design (slides). It provides a thorough explanation of what modern CMake is and why it is so much better than “old school” CMake. The modular design ideas in this talk are based on the book [Large-Scale C++ Software Design](https://www.amazon.de/Large-Scale-Soft