Skip to content

Instantly share code, notes, and snippets.

View Bigous's full-sized avatar
💭
May the force be with you

Richard Natal Bigous

💭
May the force be with you
View GitHub Profile
<!DOCTYPE html>
<html ng-app="APP">
<head>
<meta charset="UTF-8">
<title>angular-dragdrop example</title>
<style>
li:hover{background-color: #eee;}
</style>
</head>
<body ng-controller="ExampleController">
configure.bat -opensource -confirm-license -release -static -system-zlib -system-libpng -system-libjpeg -no-accessibility -no-opengl -no-sql-ibase -no-sql-mysql -no-sql-oci -no-sql-tds -no-sql-db2 -no-sql-odbc -no-sql-psql -no-sql-sqlite -no-sql-sqlite2 -no-qml-debug -no-dbus -nomake examples -nomake tools -nomake tests -D QT_NO_GRAPHICSVIEW -D QT_NO_GRAPHICSEFFECT -D QT_NO_STYLESHEET -D QT_NO_STYLE_CDE -D QT_NO_STYLE_CLEANLOOKS -D QT_NO_STYLE_MOTIF -D QT_NO_STYLE_PLASTIQUE -D QT_NO_PRINTPREVIEWDIALOG -mp -icu -no-angle -openssl-linked -I C:\Richard\wkhtmltopdf\static-build\msvc2013-win32\deplibs\include -L C:\Richard\wkhtmltopdf\static-build\msvc2013-win32\deplibs\lib OPENSSL_LIBS="-LC:\\Richard\\wkhtmltopdf\\static-build\\msvc2013-win32\\deplibs\\lib -lssleay32 -llibeay32 -lUser32 -lAdvapi32 -lGdi32 -lCrypt32"
"use strict";
exports.queryAll = function(conn, sql, args, cb) {
var allRows = [];
conn.execute(sql, args, {
resultSet: true
}, function(err, result) {
if (err) return cb(err);
function fetch() {
@Bigous
Bigous / runNode.bat
Created November 9, 2015 16:34
Run NodeJS with Garbage Collection and Statistics exposed
@echo off
node --expose-gc --track_gc_object_stats %*
@Bigous
Bigous / whereis.bat
Created November 9, 2015 16:40
Finds where is an executable in the path.
@echo off
setlocal
set FOUNDFLAG=0
:# Adiciona o diretório corrente no path para esta pesquisa apenas.
set PATH=%PATH%;.
if exist "%~$PATH:1" ( echo Encontrado em %~$PATH:1 && set FOUNDFLAG=1)
@Bigous
Bigous / sha1.bat
Created November 9, 2015 16:41
Calculate SHA1 from a file (requires nodejs to be installed)
@echo off
node -e "require('fs').readFile('%~1',function(err, data){console.log(require('crypto').createHash('sha1').update(data).digest('hex'))})"
@Bigous
Bigous / md5.bat
Created November 9, 2015 16:44
Calculates MD5 hash from file (requires NodeJS)
@echo off
node -e "require('fs').readFile('%~1',function(err, data){console.log(require('crypto').createHash('md5').update(data).digest('hex'))})"
@Bigous
Bigous / centos_cx_Oracle
Created November 12, 2015 19:02 — forked from floer32/centos_cx_Oracle
CentOS 6: Set up Oracle Instant Client and Python package cx_Oracle
#!/bin/bash
# INSTALL ORACLE INSTANT CLIENT #
#################################
# NOTE: Oracle requires at least 1176 MB of swap (or something around there).
# If you are using CentOS in a VMWare VM, there's a good chance that you don't have enough by default.
# If this describes you and you need to add more swap, see the
# "Adding a Swap File to a CentOS System" section, here:
# http://www.techotopia.com/index.php/Adding_and_Managing_CentOS_Swap_Space
@Bigous
Bigous / setOracleVars.bat
Last active December 2, 2015 11:23
Define oracledb variables for windows.
@echo off
echo Defining oracle variables...
set "OCI_LOCATION=D:\Oracle\instantclient_12_1\x64"
set "OCI_LIB_DIR=%OCI_LOCATION%\sdk\lib\msvc"
set "OCI_INC_DIR=%OCI_LOCATION%\sdk\include"
set "NODE_ORACLEDB_USER=xxx"
set "NODE_ORACLEDB_PASSWORD=yyy"
set "NODE_ORACLEDB_CONNECTIONSTRING=zzz"
set "PATH=%OCI_LOCATION%;%PATH%"
if defined VS140COMNTOOLS goto vs2015
@Bigous
Bigous / docker-guide.md
Created December 2, 2015 11:29
Docker: from zero to multi-container setups

Docker: from zero to multi-container setups

I've hacked some Docker. Here are the resources that were most essential for me.

What is Docker?

Docker is an open platform for developers and sysadmins to build, ship, and run distributed applications. Consisting of Docker Engine, a portable, lightweight runtime and packaging tool, and Docker Hub, a cloud service for sharing applications and automating workflows, Docker enables apps to be quickly assembled from components and eliminates the friction between development, QA, and production environments. As a result, IT can ship faster and run the same app, unchanged, on laptops, data center VMs, and any cloud.