Skip to content

Instantly share code, notes, and snippets.

View sadasant's full-sized avatar
👁️

Daniel Rodríguez sadasant

👁️
View GitHub Profile
@sadasant
sadasant / answer
Created October 27, 2012 19:24
jitsu's answer
sadasant@sadasant ~/code/heroku/Pong
jitsu deploy
info: Welcome to Nodejitsu sadasant
info: jitsu v0.10.3-1, node v0.8.9
info: It worked if it ends with Nodejitsu ok
info: Executing command deploy
info: Analyzing application dependencies in node app.js
info: Creating snapshot 0.0.1-1
info Uploading: [== ] 11%
error: Error running command deploy
<?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"/>
@sadasant
sadasant / respuesta.mkd
Last active December 12, 2015 02:38
@Barbie_Girl_16 me recomienda leer el artículo "La China y el deporte" de El País (17/01/13), aquí mi respuesta:

Hola, señorita.

En China ocurren fenómenos interesantes, las políticas sociales impositivas que llevaban cientos de años y que erguían un imperio comunista, que ahora se transforman a un capitalismo reservado debido a la inclusión de las políticas capitalistas de Hong Kong (antes dominado por el Imperio Británico, hasta 1997), están defendidas por un ejército que ejerce fuerte presión en la ciudadanía, el gobierno en China no negocia con el pueblo, sino que se impone. Ese comportamiento es inevitable en una propuesta comunista: Para hacer todos iguales (menos quienes ayuden a forzar las cosas), necesitas una fuerza armada que domine la voluntad popular. Esto no quiere decir que el Capitalismo sea santo, sin embargo en EEUU la política y el sector económico negocian con la población para que estos acepten sus propuestas (democracia y libre mercado). El asunto con la percepción de que todos los poderes quieren dominar al mundo no es precisamente cierta, los poderes quieren, individualmente, no perecer, y no pe

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

20:23 ::: sadasant [~sadasant@190.142.44.181] has joined #OPENVE
20:23 [Users #OpenVE]
20:23 [ NeftaliYagua] [ pankas87] [ sadasant] [ VEbot]
20:23 ::: Irssi: #OpenVE: Total of 4 nicks [0 ops, 0 halfops, 0 voices, 4 normal]
20:23 !zelazny.freenode.net [freenode-info] please register your nickname...don't forget to auto-identify!
http://freenode.net/faq.shtml#nicksetup
20:23 ::: Channel #OPENVE created Tue Sep 18 22:53:18 2012
20:23 VEbot >> sadasant: ¡Bienvenido a OpenVE! :)
20:23 ::: Irssi: Join to #OpenVE was synced in 9 secs
20:23 pankas87 >> ola gentes

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".

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});
});
});
}
}]);
@sadasant
sadasant / tools.js
Last active December 29, 2015 02:39
JavaScript Tools
// Change a function to log arguments and return
function log_args_return(f){
var s=f.toString(),
n=f.name,
_n="_"+n;
return "function "+n+"(){"+
s.replace(n,_n)+
";console.log('"+n+" args', Array.prototype.slice.call(arguments));"+
"var r="+_n+".apply(null, arguments);"+
"console.log('"+n+" return', r);return r}"