angular.module('App',[])
.directive('enter',function(){
return function(scope,element,attrs){
element.bind("keydown keypress",function(event){
if(event.which===13){
event.preventDefault();
#!/bin/bash | |
# | |
# Credits to fuckbecauseican5 from https://www.reddit.com/r/hackintosh/comments/4s561a/macos_sierra_16a238m_install_success_and_guide/ | |
# Adapted to work with the official image available into Mac App Store | |
# | |
# Enjoy! | |
hdiutil attach /Applications/Install\ macOS\ Sierra.app/Contents/SharedSupport/InstallESD.dmg -noverify -nobrowse -mountpoint /Volumes/install_app | |
hdiutil create -o /tmp/Sierra.cdr -size 7316m -layout SPUD -fs HFS+J | |
hdiutil attach /tmp/Sierra.cdr.dmg -noverify -nobrowse -mountpoint /Volumes/install_build |
// Connect to origin db | |
use some_database; // This will be named db | |
// Connecto to destiny db2 | |
db2 = db.getSiblingDB('some_other_db'); | |
// Only if needed clean destiny collection | |
db2.some_or_other_collection.remove({}); | |
// Search all origin collection and copy each to destiny collection |
$ mongodump -d some_database -c some_collection | |
$ mongorestore -d some_other_db -c some_or_other_collection dump/some_collection.bson |
#How you get Sail.js running on Openshift#
This instruction is tested with:
- Sails.js v0.9.16
- Node.js 0.10 on Openshift ( 05 May 2014)
###1) package.json
If you use the package.json build by sails new Projectname than you have to add a few fields for openshift – so the server can start you app automatically. Sails uses Grunt to build minify css/js and so on. Openshift dont have grunt installed so you have to add this also.
MAX_THREADS = 5 | |
delay = 0.5 | |
import psycopg2 | |
import re | |
import sys | |
import time | |
import threading | |
import urllib2 | |
import urlparse |
module.exports = { | |
format: 'json', | |
apiVersion: '2013-11-04', | |
endpointPrefix: 'kinesis', | |
jsonVersion: '1.1', | |
serviceFullName: 'Amazon Kinesis', | |
signatureVersion: 'v4', | |
targetPrefix: 'Kinesis_20131104', | |
timestampFormat: 'iso8601', | |
operations: { |
Originally published in June 2008
When hiring Ruby on Rails programmers, knowing the right questions to ask during an interview was a real challenge for me at first. In 30 minutes or less, it's difficult to get a solid read on a candidate's skill set without looking at code they've previously written. And in the corporate/enterprise world, I often don't have access to their previous work.
To ensure we hired competent ruby developers at my last job, I created a list of 15 ruby questions -- a ruby measuring stick if you will -- to select the cream of the crop that walked through our doors.
Candidates will typically give you a range of responses based on their experience and personality. So it's up to you to decide the correctness of their answer.
// http://jsfiddle.net/icodejs/TAVz5/ | |
(function(Highcharts) { | |
var | |
addEvent = Highcharts.addEvent, | |
each = Highcharts.each; | |
/** | |
* Filter by dragMin and dragMax | |
*/ |
Realizar backups de manera facil con rsync y ssh Enviado por RazaMetaL el Mié, 2007-02-14 14:27. Tengo dos servidores, uno tiene un eggdrop que guarda el log de actividad de un canal en /home/bot/logs/canal. Hasta ahi todo esta muy bien, pero requiero que esos logs se publiquen en un sitio web que se encuentra en otro servidor.
La manera mas sencilla y practica que encontre para hacer esta tarea fue usando rsync para sincronizar los archivos de log desde un servidor a otro y que solo se copien los archivos nuevos o modificados.
Primero vamos a decidir las opciones para rsync, en mi caso y como lo explico en el parrafo anterior requiero copiar todos los archivos al nuevo servidor, despues que copie solo los nuevos archivos y/o los modificados. Todo esto lo logro pasando las opciones -avz y -e ssh a rsync.
-a para copiar recursivamente manteniendo privilegios, fecha de creacion, permisos, etc.;