Skip to content

Instantly share code, notes, and snippets.

View sadasant's full-sized avatar
👁️

Daniel Rodríguez sadasant

👁️
View GitHub Profile
@sadasant
sadasant / command.sh
Created December 17, 2013 02:57 — forked from xxuejie/command.sh
# Suppose the currenct directory is ~/develop
$ git clone https://github.com/redis/hiredis
$ cd hiredis
# Set emscripten compiling target
$ export EMCC_LLVM_TARGET=i386-pc-linux-gnu
# Locale the installation path of webruby, for example, on my mac this is:
# ~/.gem/ruby/2.0.0/gems/webruby-0.2.4/
app.directive('ngFocus', ['$parse', function($parse) {
return function(scope, element, attr) {
var fn = $parse(attr['ngFocus']);
element.bind('focus', function(event) {
scope.$apply(function() {
fn(scope, {$event:event});
});
});
}
}]);

This is a simple demo of how to create and use a Response Interceptor in AngularJS. In this case we are using the interceptor to convert the objects created from a JSON data load into typed instances of a custom "class".

Getting command line tools on your Chromebook

If you want have some fun in the terminal with your new ARM Chromebook here's how to get a simple Arch Linux ARM chroot up and running. It assumes you already have your Chromebook in dev mode, if not google it before you continue.

This method requires no partitioning or other messing with your system, it just uses the fact that the /usr/local space is writable and persisted between upgrades.

First of, download http://archlinuxarm.org/os/ArchLinuxARM-imx6-latest.tar.gz

Open crosh with Ctrl+Alt+T

Getting command line tools on your Chromebook

If you want have some fun in the terminal with your new ARM Chromebook here's how to get a simple Arch Linux ARM chroot up and running. It assumes you already have your Chromebook in dev mode, if not google it before you continue.

This method requires no partitioning or other messing with your system, it just uses the fact that the /usr/local space is writable and persisted between upgrades.

First of, download http://archlinuxarm.org/os/ArchLinuxARM-imx6-latest.tar.gz

Open crosh with Ctrl+Alt+T

<?xml version="1.0" encoding="UTF-8"?>
<opml version="1.0">
<head>
<title>Sadasant subscriptions in Google Reader</title>
</head>
<body>
<outline title="Tech Tools" text="Tech Tools">
<outline text="All commands" title="All commands" type="rss"
xmlUrl="http://feeds2.feedburner.com/Command-line-fu" htmlUrl="http://www.commandlinefu.com/commands/browse/rss"/>
var assert = require('assert')
/*
Fizzbuzz
*/
function FizzBuzz (number) {
if (number % 3 == 0 && number % 5 == 0) return 'fizzbuzz'
else if (number % 3 == 0) return 'fizz'
else if (number % 5 == 0) return 'buzz'
else return number
@sadasant
sadasant / Resources
Created May 4, 2012 19:27 — forked from csanz/hackathons101.md
Hackathons 101
How to organize and run your own hackathon by Peter Moran: https://www.youtube.com/watch?v=1nk2zJ2GTkQ