Skip to content

Instantly share code, notes, and snippets.

View jgwill's full-sized avatar

Guillaume Descoteaux-Isabelle jgwill

View GitHub Profile
@jgwill
jgwill / .env
Last active November 14, 2018 19:18
@stcgoal nodejs@a Configure the Environment.
ZPA_DROP_DIR=b:\Dropbox\x\_drop
@jgwill
jgwill / linux-install-LXSE-desktop.sh
Created November 16, 2018 00:15
LXDE (Lightweight X11 Desktop Environment) LXDE is an incredibly lightweight Linux desktop environment, which focuses on high performances but using fewer resources. It does not need any hardware acceleration, rather it can be run on a very old machine. It’s very fast, customizable, and takes less memory. Run the following code in Terminal.
##LXDE (Lightweight X11 Desktop Environment)
#LXDE is an incredibly lightweight Linux desktop environment,
#which focuses on high performances but using fewer resources.
#It does not need any hardware acceleration, rather it can be run on a very old machine.
#It’s very fast, customizable, and takes less memory.
#Run the following code in Terminal.
# Thanks to : https://www.ubuntupit.com/best-linux-desktop-environment-reviewed-and-compared/
@jgwill
jgwill / MSE.Arduino.Common.Analog.Input.Preparing.ino
Created November 29, 2018 10:19
@stcgoal That Analogical inputs are reliable in the value when we apply logical conditionning on them. #MSE
/**
* @stcgoal That Analogical inputs are reliable in the value when we apply logical conditionning on them. #MSE
* This threat the Analog input of a pin and return an optimal number we can use
* @param int data to threat from analog read
* @return Optimally made int that should be constant
* @cr Analog input is variable and unprecise
*/
@jgwill
jgwill / destruct-mastery.181204.js
Last active December 4, 2018 19:24
@stcgoal Can we Destruct JavaScript object only using prop name?
var o = new Object();
o.name = "myname in object";
o.note = "a value we wont care about";
o.description = "my description";
var { description, name } = o; // Trying to destruct only with prop name to see if that can be done (It would be implied too :) )
@jgwill
jgwill / gcp_analyze_sentiment_1812070702.js
Created December 7, 2018 13:02
@stcgoal Learn the sentiment of a string using Google Cloud Language API
// Imports the Google Cloud client library
const language = require('@google-cloud/language');
// Instantiates a client
const client = new language.LanguageServiceClient();
// The text to analyze
const text = 'Afelia stopped working and is crashed!';
const document = {
@jgwill
jgwill / gix-gist-goal.md
Created December 7, 2018 15:06
@stcgoal Integrating GIST into various system to distribute up to date coding fragments

@v Integrating GIST into various system to distribute up to date coding fragments

@a API Rendering of HTML ready to use for apps to call

@cr Integrated into AFC

@jgwill
jgwill / check-if-pi-high.py
Last active December 8, 2018 02:23
Check if a pin of the GPIO is high on the Raspberry Pi
import RPi.GPIO as GPIO
GPIO.setmode(GPIO.BCM)
GPIO.setup(17, GPIO.IN)
if GPIO.input(17):
print("Pin 11 is HIGH")
else:
print("Pin 11 is LOW")
@jgwill
jgwill / js.func.tolowercase.1812081300.js
Created December 8, 2018 18:01
@stcgoal Change a string to lowercase in Javascript
var str = "Hello World!";
var res = str.toLowerCase();
@jgwill
jgwill / js.encodeURI.sample.1812081316.js
Created December 8, 2018 18:17
@stcgoal A String is encoded for URL usage
//@stcgoal A String is encoded for URL usage
var uri = "pattern to encode ?eouoeue=342342&ueuoeu=oeuoeu";
var res = encodeURI(uri);
@jgwill
jgwill / post-curl-1812081201-gist.sh
Last active December 9, 2018 10:40
@stcgoal Curl Content Posting - A Content is posted in the Command Line
#!/bin/bash
# @stcgoal A Content is posted in the Command Line
# @v A Content is posted to the APPRouting as plain text or JSON from the HOOKING made on mydomain.com/svn
curl --header "Content-Type: application/json" \
--request POST \
--data '{"username":"xyz","password":"xyz"}' \
http://mydomain.com:3000/myrouting