Skip to content

Instantly share code, notes, and snippets.

JGWill jgwill

View GitHub Profile
View 00nodejsOpenFile.js
//Lire un fichier et imprimer son contenu
var fs = require('fs');
fs.readFile('README.md', 'utf8', function(err, contents) {
console.log(contents);
//contents object has the data
});
View houdini-bash-batch.sh
#!/bin/bash
export rendercmd="/opt/hfs18.0/bin/hbatch-bin"
export end_cmd=";quit";
cd ~/nad.previz/x/x__for_fun__191122
#volcano_smoke_column.hiplc
@jgwill
jgwill / config.yml
Created Feb 16, 2020
CI: get Latest commit message in a Workflow
View config.yml
version: 2
jobs:
build:
docker:
- image: circleci/node:10.0.0
steps:
- checkout
@jgwill
jgwill / houBatch.py
Created Nov 21, 2019 — forked from crydalch/houBatch.py
houBatch helper script
View houBatch.py
"""
A simple script to kick off a certain ROP remotely, optionally
with a given framerange.
Usage: hython path/to/script/houBatch.py /path/to/hipfile /hou/path/to/rop
TODO: Add options for multiple ROPs, hperf.
"""
import hou, sys
@jgwill
jgwill / git-save-credential-http.sh
Created May 21, 2019
GIT Bash - credentials - How to save username and password in GIT?
View git-save-credential-http.sh
# credentials - How to save username and password in GIT? - Stack Overflow
#Run :
git config credential.helper store
#then
git pull
@jgwill
jgwill / count-files-bash.aliases.sh
Last active May 12, 2019
Count files in the current dir
View count-files-bash.aliases.sh
#@STCGoal Count files in the current dir
alias countfiles="du -a . | wc -l"
@jgwill
jgwill / bash-command-not-installed.sh
Created Apr 29, 2019
Echo a command was not found in the BASH environment
View bash-command-not-installed.sh
#!/bin/bash
command -v foo >/dev/null 2>&1 || { echo >&2 "I require foo but it's not installed. Aborting."; exit 1; }
@jgwill
jgwill / dropbox-file-from-url.js
Created Apr 28, 2019
A File URL is posted to the CHAT in the Resolution Field and the server render the content to the browser with the file content
View dropbox-file-from-url.js
//@cr A File URL is posted to the CHAT in the Resolution Field and the server render the content to the browser with the file content
var fetch = require('isomorphic-fetch'); // or another library of choice.
var fs = require('fs');
var Dropbox = require('dropbox').Dropbox;
var token = process.env.DROPBOX_TOKEN;
var dbx = new Dropbox({ accessToken: token, fetch: fetch });
var annoter_file = "9c6a35efe357580f32e759908430643d.annoter.txt";
var annoter_folder_path = '/x/_/_db/annoter';
var annoter_file_path = annoter_folder_path + '/' + annoter_file;
View dropbox-url-from-file.js
//@cr A File URL is posted to the CHAT in the Resolution Field and the server render the content to the browser with the file content
var fetch = require('isomorphic-fetch'); // or another library of choice.
var fs = require('fs');
var Dropbox = require('dropbox').Dropbox;
var token = process.env.DROPBOX_TOKEN;
var dbx = new Dropbox({ accessToken: token, fetch: fetch });
var annoter_file = "9c6a35efe357580f32e759908430643d.annoter.txt";
var annoter_folder_path = '/x/_/_db/annoter';
var annoter_file_path = annoter_folder_path + '/' + annoter_file;
@jgwill
jgwill / x-markdown-handlebars-helpers-example.js
Created Apr 15, 2019
@stcgoal That we can use Markdown into Templates data that will be rendered as HTML
View x-markdown-handlebars-helpers-example.js
//import
var h = require('handlebars');
//@stcgoal That we can use Markdown into Templates data that will be rendered as HTML
h.registerHelper('markdown', require('helper-markdown'));
//-------------------------------------------
//@STCGoal Use Markdown in your Code to Render it as HTML
You can’t perform that action at this time.