Skip to content

Instantly share code, notes, and snippets.

View victorsosa's full-sized avatar

victor sosa victorsosa

  • PeopleWare
  • Santo Domingo, Dom. Rep.
View GitHub Profile
FROM java:openjdk-8
MAINTAINER mkroli
ENV JAVA_HOME /usr/lib/jvm/java-8-openjdk-amd64
ENV SERVICEMIX_VERSION_MAJOR=7
ENV SERVICEMIX_VERSION_MINOR=0
ENV SERVICEMIX_VERSION_PATCH=1
ENV SERVICEMIX_VERSION=${SERVICEMIX_VERSION_MAJOR}.${SERVICEMIX_VERSION_MINOR}.${SERVICEMIX_VERSION_PATCH}
RUN wget http://www-us.apache.org/dist/servicemix/servicemix-${SERVICEMIX_VERSION_MAJOR}/${SERVICEMIX_VERSION}/apache-servicemix-${SERVICEMIX_VERSION}.zip; \
@victorsosa
victorsosa / fedora-install-nodejs.sh
Last active May 13, 2019 11:22 — forked from trajakovic/fedora-install-nodejs.sh
Install node.js on fedora (23+).(v5.7.0)
#!/usr/bin/env bash
func_check_for_root() {
if [ ! $( id -u ) -eq 0 ]; then
echo "ERROR: $0 Must be run as root, Script terminating" ;exit 7
fi
}
func_check_for_root
#SETUP PARAMS
@victorsosa
victorsosa / loopback-auto-update-structure.js
Created January 26, 2018 15:10 — forked from indrasantosa/loopback-auto-update-structure.js
Loopback boot scripts to update the table based on json model definition, the name of the table should be speci
var glob = require('glob');
var path = require('path');
module.exports = function(app) {
var ds = app.dataSources['automailer-db']
var files = glob.sync(path.join(__dirname, '..', '..', '/common/models/*.json'))
files.forEach(function(file) {
var modelDefinition = require(file)
user sniproxy
pidfile /var/run/sniproxy.pid
listener 209.208.27.224 80 {
proto http
table proxies
}
listener 209.208.27.224 443 {
@victorsosa
victorsosa / .autotest
Created August 6, 2016 17:02 — forked from nijitaro/.autotest
Rails 3 + rspec2 + mongoid + Factory_girl + autotest(growl)
# Include plugins
require 'autotest/fsevent'
require 'autotest/growl'
# Skip some paths
Autotest.add_hook :initialize do |autotest|
%w{.git .DS_Store ._* vendor}.each { |exception| autotest.add_exception(exception) }
false
end
@victorsosa
victorsosa / gist:2bd6eec1cc4c82b1bbb3c28dc058e1d1
Created June 30, 2016 16:23 — forked from Mithrandir0x/gist:3639232
Difference between Service, Factory and Provider in AngularJS
// Source: https://groups.google.com/forum/#!topic/angular/hVrkvaHGOfc
// jsFiddle: http://jsfiddle.net/pkozlowski_opensource/PxdSP/14/
// author: Pawel Kozlowski
var myApp = angular.module('myApp', []);
//service style, probably the simplest one
myApp.service('helloWorldFromService', function() {
this.sayHello = function() {
return "Hello, World!"
@victorsosa
victorsosa / _.md
Created June 9, 2016 23:14 — forked from marcoslin/_.md
ui-router: Lazy Loading State

Lazy Load States

Sample code for on how to lazy load state for ui-router

@victorsosa
victorsosa / Dockerfile
Created April 22, 2016 18:36
Docker fedora 23 nginx passenger
FROM fedora:23
ENV RACK_ENV=production RAILS_ENV=production
ENV APP_HOME /home/app/logica-erp
ENV SECRET_KEY_BASE_KDS=ddb70f72d4e61d32e30c941748f50d6e4e338adc05662235d5003a41218154141c081c548aa7a101c157825c6ac1250cf60504c7993e96045b7d33bc483c2dd8
RUN dnf update -y
RUN dnf install https://downloads.ulyaoth.net/rpm/ulyaoth-1.1.0-1.fedora.noarch.rpm -y
RUN dnf install -y ulyaoth-nginx-passenger5 ulyaoth-nginx-passenger5-selinux
RUN dnf install -y git make curl-devel openssl-devel ruby-devel rubygem-bundler libxslt-devel libxml2-devel java-devel patch gcc-c++ redhat-rpm-config
user nginx;
worker_processes auto;
error_log /var/log/nginx/error.log warn;
pid /var/run/nginx.pid;
events {
worker_connections 1024;
@victorsosa
victorsosa / gist:c6a2c77b4a74e431ab8b62d573ce931e
Created April 13, 2016 15:04 — forked from yograterol/gist:99c8e123afecc828cb8c
"gcc: error: /usr/lib/rpm/redhat/redhat-hardened-cc1: No such file or directory" workaround
"gcc: error: /usr/lib/rpm/redhat/redhat-hardened-cc1: No such file or directory" CentOS's and Fedora +22 workaround
Install `redhat-rpm-config`
$ sudo dnf install redhat-rpm-config