Skip to content

Instantly share code, notes, and snippets.

View nverinaud's full-sized avatar

Nicolas VERINAUD nverinaud

View GitHub Profile
@nverinaud
nverinaud / swift-kotlinified-optional-let.swift
Created April 1, 2020 05:07
Swift Kotlinified : Optional.let
extension Optional {
func `let`(_ action: (Wrapped) -> ()) {
if let value = self {
action(value)
}
}
}
// Usage
@nverinaud
nverinaud / dev_learning_manifesto.md
Last active March 17, 2017 12:07
The Software Developer Learning Manifesto

The Software Developer Learning Manifesto

  • Learning programming fundamentals over learning technologies and frameworks
  • Building stuff with new knowledge over learning passively by only reading, listening or watching

That is, while there is value in the items on the right, we value the items on the left more.

Manifeste D'Apprentissage pour Développeur de logiciels

@nverinaud
nverinaud / gist:083f8cf1a1ff63bd4222
Created April 8, 2015 13:08
Xcode Regex to find all non-localized string.
(?<!(NSLocalizedString\(|NSLog\())@".*"
@nverinaud
nverinaud / gist:10268939
Last active August 29, 2015 13:58
ReactiveUI controller bindings stuff
using System;
using ReactiveUI.Cocoa;
using MonoTouch.Foundation;
using ReactiveUI;
using System.Reactive.Linq;
using MonoTouch.UIKit;
using System.Drawing;
namespace MyApp
{
@nverinaud
nverinaud / gist:7942279
Last active December 31, 2015 05:39
Diff between event-driven and FRP.
// event driven
loadArticle(function (article) {
myTextField.text = article.title;
if (article.title == "toto")
alert("Toto arrived");
});
// FRP
var article = loadArticle();
article.whenAnyValue('title').bindTo(myTextField.text);
@nverinaud
nverinaud / gist:7695369
Last active December 29, 2015 16:09
C# way of doing ObjC blocks.
/* Declaration */
// In ObjC
typedef void (^onCompletion)(bool completed);
// In C#
public delegate void OnCompletion(bool completed);
/* Implementation */
@nverinaud
nverinaud / jquery-wiki-blink.js
Created February 21, 2013 15:42
jQuery Blink Improvements
@nverinaud
nverinaud / gist:4244190
Created December 9, 2012 10:46
Rails App Get Started
Rails Guide
1) Create a new rails app
rails new APP_NAME --skip-test-unit
cd APP_NAME
2) The GEMFILE
source 'https://rubygems.org'
@nverinaud
nverinaud / nuit-info-2012-AGK.md
Created December 7, 2012 05:44
Rendu Défis Human Coders (Nuit Info 2012)
@nverinaud
nverinaud / javascript-prototyping-best-practices.js
Created November 11, 2012 10:03
Javascript Prototyping Best Practices
'use strict';
/*
# Javascript Prototyping Best Practices
* To create a class, create a constructor function with a `Name` and assign
it to a variable of the same `Name`.
* In this constructor only define properties using `this.prop` notation