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 / 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 %*
"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() {
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"
<!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">