Skip to content

Instantly share code, notes, and snippets.

View MoOx's full-sized avatar
:shipit:
Freelance React / React Native Expert, Cross-platform fanboy (native, web...)

Max Thirouin MoOx

:shipit:
Freelance React / React Native Expert, Cross-platform fanboy (native, web...)
View GitHub Profile
#!/bin/bash
: '
Change your mac address on a MacBook
Can be used for free wifi on airports or train stations =)
$ chmod +x freewifi.sh
$ ./freewifi.sh
'
interface=en1 # en0 for cable & en1 for wifi
@koistya
koistya / ReactJS-Server-Side-Rendering.md
Last active September 15, 2023 07:32
Server-side Rendering (SSR) for ReactJS / Flux Applications. Setting document.title

Files

The basic structure of a React+Flux application (see other examples)

 - /src/actions/AppActions.js     - Action creators (Flux)
 - /src/components/Application.js - The top-level React component
 - /src/constants/ActionTypes.js  - Action types (Flux)
 - /src/core/Dispatcher.js        - Dispatcher (Flux)
 - /src/stores/AppStore.js        - The main store (Flux)
http://code.hootsuite.com/css-at-hootsuite/
http://mikeaparicio.com/2014/08/10/css-at-groupon/
http://blog.trello.com/refining-the-way-we-structure-our-css-at-trello/
http://markdotto.com/2014/07/23/githubs-css/
http://codepen.io/chriscoyier/blog/codepens-css
http://ianfeather.co.uk/css-at-lonely-planet/
https://medium.com/@fat/mediums-css-is-actually-pretty-fucking-good-b8e2a6c78b06
http://blog.brianlovin.com/buffers-css/
http://dev.ghost.org/css-at-ghost/
@thibault
thibault / internationl_phone_regex.py
Created November 6, 2014 10:58
International phone number validation regex in Python
phone_re = re.compile(r'^\+(999|998|997|996|995|994|993|992|991|'
'990|979|978|977|976|975|974|973|972|971|970|'
'969|968|967|966|965|964|963|962|961|960|899|'
'898|897|896|895|894|893|892|891|890|889|888|'
'887|886|885|884|883|882|881|880|879|878|877|'
'876|875|874|873|872|871|870|859|858|857|856|'
'855|854|853|852|851|850|839|838|837|836|835|'
'834|833|832|831|830|809|808|807|806|805|804|'
'803|802|801|800|699|698|697|696|695|694|693|'
'692|691|690|689|688|687|686|685|684|683|682|'
@thibault
thibault / rexep.pl
Created October 14, 2014 07:15
Monster regexp
(?:(?:\r\n)?[ \t])*(?:(?:(?:[^()<>@,;:\\".\[\] \000-\031]+(?:(?:(?:\r\n)?[ \t])+|\Z|(?=[\["()<>@,;:\\".\[\]]))|"(?:[^\"\r\\]|\\.|(?:(?:\r\n)?[ \t]))*"(?:(?:\r\n)?[ \t])*)(?:\.(?:(?:\r\n)?[ \t])*(?:[^()<>@,;:\\".\[\] \000-\031]+(?:(?:(?:\r\n)?[ \t])+|\Z|(?=[\["()<>@,;:\\".\[\]]))|"(?:[^\"\r\\]|\\.|(?:(?:\r\n)?[ \t]))*"(?:(?:\r\n)?[ \t])*))*@(?:(?:\r\n)?[ \t])*(?:[^()<>@,;:\\".\[\] \000-\031]+(?:(?:(?:\r\n)?[ \t])+|\Z|(?=[\["()<>@,;:\\".\[\]]))|\[([^\[\]\r\\]|\\.)*\](?:(?:\r\n)?[ \t])*)(?:\.(?:(?:\r\n)?[ \t])*(?:[^()<>@,;:\\".\[\] \000-\031]+(?:(?:(?:\r\n)?[ \t])+|\Z|(?=[\["()<>@,;:\\".\[\]]))|\[([^\[\]\r\\]|\\.)*\](?:(?:\r\n)?[ \t])*))*|(?:[^()<>@,;:\\".\[\] \000-\031]+(?:(?:(?:\r\n)?[ \t])+|\Z|(?=[\["()<>@,;:\\".\[\]]))|"(?:[^\"\r\\]|\\.|(?:(?:\r\n)?[ \t]))*"(?:(?:\r\n)?[ \t])*)*\<(?:(?:\r\n)?[ \t])*(?:@(?:[^()<>@,;:\\".\[\] \000-\031]+(?:(?:(?:\r\n)?[ \t])+|\Z|(?=[\["()<>@,;:\\".\[\]]))|\[([^\[\]\r\\]|\\.)*\](?:(?:\r\n)?[ \t])*)(?:\.(?:(?:\r\n)?[ \t])*(?:[^()<>@,;:\\".\[\] \000-\031]+(?:(?:(?:\r\n)?[ \t])+|\
@madx
madx / test.sh
Last active August 29, 2015 14:04
Test runner with tape + tap-dot
#!/bin/bash
TEST_FILES=`find test/ -name "*.js"`
run_tests() {
local tests="$@"
for test in $tests; do
echo -ne "\033[1;33m$test\033[0m"
tape $test | tap-dot
@benedfit
benedfit / _critical.scss
Last active November 25, 2021 12:36
Critical CSS using Sass and Jekyll
$critical-css-only:true !default;
@mixin critical($critical-only:true){
@if (($critical-css-only and $critical-only) or (not $critical-css-only and not $critical-only)){
@content;
}
}
@hdragomir
hdragomir / sm-annotated.html
Last active March 5, 2024 08:57
The deferred font loading logic for Smashing Magazine. http://www.smashingmagazine.com/
<script type="text/javascript">
(function () {
"use strict";
// once cached, the css file is stored on the client forever unless
// the URL below is changed. Any change will invalidate the cache
var css_href = './index_files/web-fonts.css';
// a simple event handler wrapper
function on(el, ev, callback) {
if (el.addEventListener) {
el.addEventListener(ev, callback, false);
var $ = require('NodObjC');
$.import('Cocoa');
var installNSBundleHook = function() {
var cls = $.NSBundle;
if (cls) {
var bundleIdentifier = cls.getInstanceMethod('bundleIdentifier');
bundleIdentifier.setImplementation(function(val) {