Skip to content

Instantly share code, notes, and snippets.

View nelyj's full-sized avatar
👁️
25/8

Nelson Jiménez nelyj

👁️
25/8
View GitHub Profile
@nelyj
nelyj / gist:80081f598749d4abbe90
Created June 5, 2015 18:37
fileUpload to base64 Directive
.directive('fileUploaded', function ($q) {
var slice = Array.prototype.slice;
return {
restrict: 'A',
require: '?ngModel',
link: function (scope, element, attrs, ngModel) {
ngModel.$render = function() {};
element.bind('change', function(e){
# Logfile created on 2015-04-17 19:52:14 +0000 by logger.rb/44203
Connecting to database specified by database.yml
2015-04-17T19:52:18.285Z 331 TID-ovpzpbr5c INFO: Booting Sidekiq 3.3.3 with redis options {:url=>"redis://server.8x2rxq.0001.use1.cache.amazonaws.com:6379", :namespace=>"Sidekiq", :network_timeout=>5}
could not connect to server: No such file or directory
Is the server running locally and accepting
connections on Unix domain socket "/var/run/postgresql/.s.PGSQL.5432"?
# Fixing permissions of packaged gems
files:
"/opt/elasticbeanstalk/hooks/appdeploy/pre/10_fixing_permission.sh":
content: |
#!/usr/bin/env bash
# . /opt/elasticbeanstalk/containerfiles/envvars
. /opt/elasticbeanstalk/support/envvars
CACHE_GEM_DIR=$EB_CONFIG_APP_ONDECK/vendor/cache
Country.create([{name: "Afghanistan",alpha: "AFG",code: "004"},{name: "Åland Islands",alpha: "ALA",code: "248"},{name: "Albania",alpha: "ALB",code: "008"},{name: "Algeria",alpha: "DZA",code: "012"},{name: "American Samoa",alpha: "ASM",code: "016"},{name: "Andorra",alpha: "AND",code: "020"},{name: "Angola",alpha: "AGO",code: "024"},{name: "Anguilla",alpha: "AIA",code: "660"},{name: "Antarctica",alpha: "ATA",code: "010"},{name: "Antigua and Barbuda",alpha: "ATG",code: "028"},{name: "Argentina",alpha: "ARG",code: "032"},{name: "Armenia",alpha: "ARM",code: "051"},{name: "Aruba",alpha: "ABW",code: "533"},{name: "Australia",alpha: "AUS",code: "036"},{name: "Austria",alpha: "AUT",code: "040"},{name: "Azerbaijan",alpha: "AZE",code: "031"},{name: "Bahamas",alpha: "BHS",code: "044"},{name: "Bahrain",alpha: "BHR",code: "048"},{name: "Bangladesh",alpha: "BGD",code: "050"},{name: "Barbados",alpha: "BRB",code: "052"},{name: "Belarus",alpha: "BLR",code: "112"},{name: "Belgium",alpha: "BEL",code: "056"},{name: "Belize",alpha
$.index.open();
var myPlaces = Alloy.createCollection("Place");
places=myPlaces.fetch();
console.log(places);
[
{
id: 1,
name: "Botilleria Uno",
description: "Es una prueba 1",
address: null,
latitude: null,
longitude: null,
created_at: "2015-02-11T16:53:02.070Z",
updated_at: "2015-02-11T16:53:02.070Z"
exports.definition = {
config: {
"URL": "http://192.168.0.15:3000/v/places",
// "debug": 1,
"adapter": {
"type": "restapi",
"collection_name": "Place",
"idAttribute": "id"
},
"headers": { // your custom headers
@nelyj
nelyj / gist:725ec342b25f83859c1c
Created December 16, 2014 14:26
.htacces configuracion
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^blog/(.*) /home.php/#/$1
RewriteRule ^(.*) /index.php/#/$1 [L]
</IfModule>
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^blog/(.*) /home.php/#/$1
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
[{"country":null,"name":"Buscador de trabajos part time","round":21,"formalized":null,"sup_code":null,"industry":null,"executive_account":null,"slug":"buscador-de-trabajos-part-time"},{"country":"Burundi","name":"Hackett Inc","round":0,"formalized":null,"sup_code":null,"industry":null,"executive_account":null,"slug":"hackett-inc"},{"country":"Burundi","name":"Hackett Inc","round":0,"formalized":null,"sup_code":null,"industry":null,"executive_account":null,"slug":"hackett-inc--2"},{"country":"Burundi","name":"Hackett Inc","round":0,"formalized":null,"sup_code":null,"industry":null,"executive_account":null,"slug":"hackett-inc--3"},{"country":"Burundi","name":"Hackett Inc","round":0,"formalized":null,"sup_code":null,"industry":null,"executive_account":null,"slug":"hackett-inc--4"},{"country":"Burundi","name":"Hackett Inc","round":0,"formalized":null,"sup_code":null,"industry":null,"executive_account":null,"slug":"hackett-inc--5"},{"country":"Burundi","name":"Hackett Inc","round":0,"formalized":null,"sup_code":nu