Skip to content

Instantly share code, notes, and snippets.

View jdaviderb's full-sized avatar
👨‍💻
Creating

Jorge Hernandez jdaviderb

👨‍💻
Creating
View GitHub Profile
@jdaviderb
jdaviderb / disable_cross_rails_4.txt
Created January 26, 2014 05:01
Disable Cross Rails 4
step 1
Install rack-cors
into Gemfile define
gem 'rack-cors', :require => 'rack/cors'
Step 2
into Config.ru add the following lines
require 'rack/cors'
@jdaviderb
jdaviderb / disable_migration
Last active August 29, 2015 13:56
disable migration rails
config.sequel.schema_dump = false
config.app_generators.sequel[:migration] = false
--no-migration
05-05 14:18:18.209 2494 2494 D AndroidRuntime: >>>>>> START com.android.internal.os.RuntimeInit uid 0 <<<<<<
05-05 14:18:18.212 2494 2494 D AndroidRuntime: CheckJNI is OFF
05-05 14:18:18.231 2494 2494 D ICU : No timezone override file found: /data/misc/zoneinfo/current/icu/icu_tzdata.dat
05-05 14:18:18.259 2494 2494 E memtrack: Couldn't load memtrack module (No such file or directory)
05-05 14:18:18.259 2494 2494 E android.os.Debug: failed to load memtrack module: -2
05-05 14:18:18.261 2494 2494 I Radio-JNI: register_android_hardware_Radio DONE
05-05 14:18:18.273 2494 2494 D AndroidRuntime: Calling main entry com.android.commands.pm.Pm
05-05 14:18:18.287 607 621 I ActivityManager: Force stopping org.nativescript.maldito appid=10062 user=-1: uninstall pkg
05-05 14:18:18.316 607 630 I art : Starting a blocking GC Explicit
05-05 14:18:18.338 607 630 I art : Explicit concurrent mark sweep GC freed 23719(1332KB) AllocSpace objects, 3(60KB) LOS objects, 33% free, 6MB/9MB, pause
'use strict';
const express = require('express');
const morgan = require('morgan');
const app = express();
//middlewares
const authenticationMiddleware = require('./middleware/authentication');
// resources
const usersResource = require('./resources/users');
const postsResource = require('./resources/posts');
chgrp -R www-data io/
chrgp -R grupo carpeta
kill proccess with server port
kill -9 $(lsof -i tcp:3000 -t)
@jdaviderb
jdaviderb / test.js
Created May 1, 2017 15:10
compatibilidad con CommonJS
class GT {
constructor () {
this.state = {}
this.actions = {}
this.stateListeners = {}
}
get register () {
return {
@jdaviderb
jdaviderb / gist:4943270d6e2807b159cc166ee88594ff
Created May 26, 2017 21:42 — forked from marty-wang/gist:5a71e9d0a6a2c6d6263c
Compile and deploy React Native Android app of Release version to device.
Disclaimer: The instructions are the collective efforts from a few places online.
Nothing here is my original. But I want to put them together in one place to save people from spending the same time as I did.
First off, bundle.
==================
1. cd to the project directory
2. Start the react-native packager if not started
3. Download the bundle to the asset folder:
curl "http://localhost:8081/index.android.bundle?platform=android" -o "android/app/src/main/assets/index.android.bundle"
techteam@CISRV01:~/docker/sbt/warrantxApi$ cat docker-compose.yml
version: '3'
services:
sbt:
build: .
stdin_open: true
tty: true
command: bash -c 'sbt start'
volumes:
- .:/root
def filter
Budget::Investment
.where(mariquito, "valor del status")
end
def mariquito
<<-SQL
(SELECT status_id FROM budget_investment_milestones
WHERE investment_id = budget_investments.id ORDER BY created_at ASC LIMIT !) = ?
SQL