Skip to content

Instantly share code, notes, and snippets.

Alessandro Metta n0f3

  • San Francisco, CA
Block or report user

Report or block n0f3

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@n0f3
n0f3 / SidebarController.cs
Created Sep 20, 2013
Simple event system to queue and process prioritized events.
View SidebarController.cs
using System;
using System.Collections;
using System.Collections.Generic;
public class SidebarController : MonoBehaviour {
private SidebarEventController.GenericSidebarEventArgs currEventProcessed;
private SidebarEventController.SidebarEventID currEventID;
//Determines whether or not a specific sidebar is in view and available to
@n0f3
n0f3 / batchRemoteDelete
Created Mar 11, 2014
Delete remote branches containing a specific substring in the name
View batchRemoteDelete
for fstring in $(git for-each-ref --format="%(refname:short)" refs/remotes/origin/f_qa\*); do j=`echo $fstring | cut -d / -f 2`;j=$j;echo $j; done
@n0f3
n0f3 / Preferences.sublime-settings
Created Aug 18, 2015
Sublime Text 3 User Settings
View Preferences.sublime-settings
{
"font_face": "Input Mono",
"font_size": 12,
"font_options": ["no_round"],
"highlight_line": true,
"ignored_packages":
[
"Vintage"
],
"translate_tabs_to_spaces": true,
@n0f3
n0f3 / codecampsnippets.js
Last active Dec 2, 2015
A collection of snippets from freecodecamp for reference
View codecampsnippets.js
// This is to access the location from the browser.
if (navigator.geolocation) {
navigator.geolocation.getCurrentPosition(function(position) {
$("#data").html("latitude: " + position.coords.latitude + "<br>longitude: " + position.coords.longitude);
});
}
@n0f3
n0f3 / commit-msg
Created Mar 16, 2017
Git commit message hook
View commit-msg
#!/bin/bash
files=$(git diff --cached --name-only | grep '\.jsx\?$')
# Prevent ESLint help message if no files matched
if [[ $files = "" ]] ; then
exit 0
fi
failed=0
for file in ${files}; do
@n0f3
n0f3 / Readme.md
Created Mar 30, 2017 — forked from mxstbr/Readme.md
Enable tab completion for JSX with Emmet in Atom
View Readme.md

Enable tab completion for JSX with Emmet in Atom

This guide assumes you have the emmet and language-babel packages already installed in Atom

Gif of the tab completion working

  1. Open the keymap.cson file by clicking on Atom -> Keymap… in the menu bar
  2. Add these lines of code to your keymap:
'atom-text-editor[data-grammar~="jsx"]:not([mini])':
@n0f3
n0f3 / snippets.js
Last active Feb 20, 2018
Learn redux snippets #javascript
View snippets.js
// This enables hot loading for reducers
if (module.hot) {
module.hot.accept('./reducers/', () => {
// using require because the import syntax is required to be declared
// at the top of the file
const nextRootReducer = rquire('./reducers/index').default;
store.replaceReducer(nextRootReducer);
})
}
@n0f3
n0f3 / modules.txt
Last active Apr 14, 2017
List of modules
View modules.txt
Form Modules
https://github.com/christianalfoni/formsy-react
https://alexkuz.github.io/react-input-enhancements/
http://gcanti.github.io/tcomb-form
https://github.com/andrewhathaway/winterfell
https://github.com/davidkpiano/react-redux-form
ES6
https://www.npmjs.com/package/babel
You can’t perform that action at this time.