Skip to content

Instantly share code, notes, and snippets.

View elhoucine's full-sized avatar

Elhoucine Azayou elhoucine

  • France
View GitHub Profile

JavaScript to Rust Cheat Sheet

The goal of this is to have an easily-scannable reference for the most common syntax idioms in JavaScript and Rust so that programmers most comfortable with JavaScript can quickly get through the syntax differences and feel like they could read and write basic Rust programs.

What do you think? Does this meet its goal? If not, why not?

Variables

JavaScript:

@elhoucine
elhoucine / gh-pages-deploy.md
Created March 19, 2016 01:01 — forked from cobyism/gh-pages-deploy.md
Deploy to `gh-pages` from a `dist` folder on the master branch. Useful for use with [yeoman](http://yeoman.io).

Deploying a subfolder to GitHub Pages

Sometimes you want to have a subdirectory on the master branch be the root directory of a repository’s gh-pages branch. This is useful for things like sites developed with Yeoman, or if you have a Jekyll site contained in the master branch alongside the rest of your code.

For the sake of this example, let’s pretend the subfolder containing your site is named dist.

Step 1

Remove the dist directory from the project’s .gitignore file (it’s ignored by default by Yeoman).

@elhoucine
elhoucine / InfiniteListView.js
Created December 13, 2015 18:09 — forked from kjantzer/InfiniteListView.js
Backbone.js: Infinite Scrolling List View
/*
Infinite List View
creates <ul> with triggers for infinite scrolling
@author Kevin Jantzer, Blacktone Audio Inc.
@since 2012-11-06
USE - listen for:
@elhoucine
elhoucine / .bash_profile
Created November 25, 2015 16:01 — forked from natelandau/.bash_profile
Mac OSX Bash Profile
# ---------------------------------------------------------------------------
#
# Description: This file holds all my BASH configurations and aliases
#
# Sections:
# 1. Environment Configuration
# 2. Make Terminal Better (remapping defaults and adding functionality)
# 3. File and Folder Management
# 4. Searching
# 5. Process Management
function dispatch(target, eventType, char) {
var evt = document.createEvent("TextEvent");
evt.initTextEvent (eventType, true, true, window, char, 0, "en-US");
target.focus();
target.dispatchEvent(evt);
}
dispatch(document.querySelector("#compose-input div"), "textInput", "hello!");
@elhoucine
elhoucine / business-models.md
Last active August 29, 2015 14:27 — forked from ndarville/business-models.md
Business models based on the compiled list at http://news.ycombinator.com/item?id=4924647. I find the link very hard to browse, so I made a simple version in Markdown instead.

Business Models

Advertising

Models Examples
Display ads Yahoo!
Search ads Google
sudo add-apt-repository ppa:webupd8team/sublime-text-2;
sudo apt-get update;
sudo apt-get install sublime-text
sudo ln -s /usr/lib/sublime-text-2/sublime_text /usr/local/bin/sublime
@elhoucine
elhoucine / mad-equals
Last active August 29, 2015 13:57
mad-equals
from os import system
from urllib import urlopen
from re import compile, findall
from datetime import datetime
currencies=["eur","usd","gbp","aud","cad","chf"]
currenciesLongName={currencies[0]:"Euro",
currencies[1]:"US Dollar",
currencies[2]:"British Pound",
currencies[3]:"Australian Dollar",
@elhoucine
elhoucine / first
Created March 13, 2014 17:34
First
<p> Hello, World! </>