Skip to content

Instantly share code, notes, and snippets.

View carlosmcevilly's full-sized avatar

Carlos McEvilly carlosmcevilly

View GitHub Profile
@carlosmcevilly
carlosmcevilly / async_scraper.py
Created July 10, 2017 20:50 — forked from wtneal/async_scraper.py
asyncio scraper
import asyncio
import aiofiles
import aiohttp
import logging
import re
import sys
import os
import lxml.html
#!/bin/bash
#
# Using the information available in the new iOS8 simulator for each
# device/runtime (device.plist), this script creates a readable folder structure
# (no UDIDs, just simple device/runtime names). Inside that structure it creates
# soft links to your apps in development.
#
# You can run this script every time you install an app to your simulator, or
# you can simply call it to access this folder making sure it will always be
# updated :)

The introduction to Reactive Programming you've been missing

(by @andrestaltz)

So you're curious in learning this new thing called (Functional) Reactive Programming (FRP).

Learning it is hard, even harder by the lack of good material. When I started, I tried looking for tutorials. I found only a handful of practical guides, but they just scratched the surface and never tackled the challenge of building the whole architecture around it. Library documentations often don't help when you're trying to understand some function. I mean, honestly, look at this:

Rx.Observable.prototype.flatMapLatest(selector, [thisArg])

Projects each element of an observable sequence into a new sequence of observable sequences by incorporating the element's index and then transforms an observable sequence of observable sequences into an observable sequence producing values only from the most recent observable sequence.

# ~/.osx — http://mths.be/osx
###############################################################################
# General UI/UX #
###############################################################################
# Set computer name (as done via System Preferences → Sharing)
scutil --set ComputerName "MathBook Pro"
scutil --set HostName "MathBook Pro"
scutil --set LocalHostName "MathBook-Pro"
package dropbox
import (
"bytes"
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
"strconv"
@carlosmcevilly
carlosmcevilly / multiple_ssh_setting.md
Created October 18, 2012 13:20 — forked from fanwaze-dev/multiple_ssh_setting.md
Multiple SSH keys for different github accounts

Multiple SSH Keys settings for different github accounts

create different public key

create different ssh key according the article Mac Set-Up Git

$ ssh-keygen -t rsa -C "your_email@youremail.com"
@carlosmcevilly
carlosmcevilly / gist:3865987
Created October 10, 2012 14:30 — forked from codeincontext/gist:3862543
Photo capture, manipulation, and upload in iOS6 Safari
<!DOCTYPE html>
<html>
<head>
<title>iOS6 Safari Photo Capture Demo</title>
<script type="text/javascript">
window.onload = function() {
var input = document.getElementById("input");
input.addEventListener("change", handleFile);
}
@carlosmcevilly
carlosmcevilly / gist:2641614
Created May 9, 2012 03:35 — forked from luikore/gist:149493
chinese string
# regexps to check if a string is pure chinese
class String
# 20k chars
CHINESE_UCS2 = /^(?:
[\x4e-\x9e][\x00-\xff]
|\x9f[\x00-\xa5]
)+$/xn
# 20k chars
CHINESE_UTF8 = /^(?:
@carlosmcevilly
carlosmcevilly / gist:2641563
Created May 9, 2012 03:28 — forked from ferostabio/gist:1431192
Avoid iCloud syncing
- (BOOL) addSkipBackupAttributeToItemAtURL:(NSURL *)URL
{
const char* filePath = [[URL path] fileSystemRepresentation];
const char* attrName = "com.apple.MobileBackup";
u_int8_t attrValue = 1;
int result = setxattr(filePath, attrName, &attrValue, sizeof(attrValue), 0, 0);
return result == 0;
}
@carlosmcevilly
carlosmcevilly / hack.sh
Created March 31, 2012 17:17 — forked from erikh/hack.sh
OSX For Hackers
#!/usr/bin/env sh
##
# This is script with useful tips taken from:
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx
#
# install it:
# curl -sL https://raw.github.com/gist/2108403/hack.sh | sh
#