Skip to content

Instantly share code, notes, and snippets.

View igor9silva's full-sized avatar
🧑‍🍳
cooking

Igor Silva igor9silva

🧑‍🍳
cooking
View GitHub Profile
@benfoster
benfoster / gist:4488755
Created January 8, 2013 22:48
Patching in ASP.NET Web API
using Newtonsoft.Json;
using System;
using System.Collections.Concurrent;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Diagnostics.CodeAnalysis;
using System.Dynamic;
using System.Linq;
using System.Linq.Expressions;
using System.Net;
@sstadelman
sstadelman / gist:1a68c514f1cdb94f829f
Created June 20, 2014 20:31
SDK 3.0 SP05 header & library search paths
HEADER_SEARCH_PATHS = (
"$(inherited)",
"/Applications/Xcode6-Beta2.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include",
"$(PROJECT_DIR)/../../target/headers/$(BUILD_STYLE)-$(PLATFORM_NAME)/com.sap.smp.client.ios/XScriptParser",
"$(PROJECT_DIR)/../../target/headers/$(BUILD_STYLE)-$(PLATFORM_NAME)/com.sap.smp.client.ios/Supportability",
"$(PROJECT_DIR)/../../target/headers/$(BUILD_STYLE)-$(PLATFORM_NAME)/com.sap.smp.client.ios/ODataOnline",
"$(PROJECT_DIR)/../../target/headers/$(BUILD_STYLE)-$(PLATFORM_NAME)/com.sap.smp.client.ios/ODataAPI",
"$(PROJECT_DIR)/../../target/headers/$(BUILD_STYLE)-$(PLATFORM_NAME)/com.sap.smp.client.ios/HttpConversation",
"$(PROJECT_DIR)/../../target/headers/$(BUILD_STYLE)-$(PLATFORM_NAME)/com.sap.smp.client.ios/HttpConvAuthFlows",
"$(PROJECT_DIR)/../../target/headers/$(BUILD_STYLE)-$(PLATFORM_NAME)/com.sap.smp.client.ios/E2ETrace2",
@kafaichoi
kafaichoi / gist:a6f8bda444da4e3a5886
Created September 17, 2014 06:39
Setting Up test build for Ionic App for HockeyApp
Register in HockeyApp
-Android
1. cordova build --release android
2. keytool -genkey -v -keystore my-release-key.keystore -alias alias_name -keyalg RSA -keysize 2048 -validity 10000
3. jarsigner -verbose -sigalg SHA1withRSA -digestalg SHA1 -keystore my-release-key.keystore HelloWorld-release-unsigned.apk alias_name
4. zipalign -v 4 HelloWorld-release-unsigned.apk HelloWorld.apk
5. upload apk file to HockeyApp
-IOS
1. cordova build --release ios
import basin
import string
from hashlib import sha1
## Fixed-length compact ids for compound keys. Given one or more strings, this will
## concat with delim (default '|'), sha1 hash the result, convert to the given base
## (default 62), truncate to the given length (default 12) and left-pad with zeros.
##
## *** WARNING MATH AHEAD ***
## Here's a handy way to approximate the birthday number for a given bitspace and a
@oleganza
oleganza / async_swift_proposal.md
Last active May 12, 2023 10:06
Concrete proposal for async semantics in Swift

Async semantics proposal for Swift

Modern Cocoa development involves a lot of asynchronous programming using blocks and NSOperations. A lot of APIs are exposing blocks and they are more natural to write a lot of logic, so we'll only focus on block-based APIs.

Block-based APIs are hard to use when number of operations grows and dependencies between them become more complicated. In this paper I introduce asynchronous semantics and Promise type to Swift language (borrowing ideas from design of throw-try-catch and optionals). Functions can opt-in to become async, programmer can compose complex logic involving asynchronous operations while compiler produces necessary closures to implement that logic. This proposal does not propose new runtime model, nor "actors" or "coroutines".

Table of contents

@Restuta
Restuta / framework-sizes.md
Last active September 19, 2024 15:32
Sizes of JS frameworks, just minified + minified and gzipped, (React, Angular 2, Vue, Ember)

Below is the list of modern JS frameworks and almost frameworks – React, Vue, Angular, Ember and others.

All files were downloaded from https://cdnjs.com and named accordingly. Output from ls command is stripped out (irrelevant stuff)

As-is (minified)

$ ls -lhS
566K Jan 4 22:03 angular2.min.js
@JonDouglas
JonDouglas / xamarinandroidbindings.md
Last active September 8, 2024 20:45
Xamarin Android Bindings Troubleshooting

Approaching a Xamarin.Android Bindings Case

1. Investigation

One of the best ways to investigate a problematic Xamarin.Android Binding is to first ensure you have the proper tooling available:

@emaloney
emaloney / guard-closure.md
Last active August 1, 2023 00:24
A simplified notation for avoiding the weak/strong dance with closure capture lists

Simplified notation for avoiding the [weak self]/strongSelf dance with closures

  • Proposal: TBD
  • Author: Evan Maloney
  • Status: Draft
  • Review manager: TBD

Introduction

Frequently, closures are used as completion callbacks for asynchronous operations, such as when dealing with network requests. It is quite common to model these sorts of operations in such a way that an object instance represents a request/response transaction, for example:

@lattner
lattner / async_swift_proposal.md
Last active October 29, 2024 18:53 — forked from oleganza/async_swift_proposal.md
Concrete proposal for async semantics in Swift

Async/Await for Swift

Introduction

Modern Cocoa development involves a lot of asynchronous programming using closures and completion handlers, but these APIs are hard to use. This gets particularly problematic when many asynchronous operations are used, error handling is required, or control flow between asynchronous calls gets complicated. This proposal describes a language extension to make this a lot more natural and less error prone.

This paper introduces a first class Coroutine model to Swift. Functions can opt into to being async, allowing the programmer to compose complex logic involving asynchronous operations, leaving the compiler in charge of producing the necessary closures and state machines to implement that logic.