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
@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 / 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
<!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">
@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 / 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 / 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 / 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 %*