Skip to content

Instantly share code, notes, and snippets.

View wachukxs's full-sized avatar
💭
building stuff

Chuks Jr. wachukxs

💭
building stuff
View GitHub Profile
@wachukxs
wachukxs / export-env-to-heroku.sh
Created September 11, 2023 07:25
.sh command to auto export your .env content to Heroku
#!/bin/zsh
# set -o allexport
# source .env
# set +o allexport
while read line;
do
if [[ $line == "#"* ]] || [[ $line == "" ]] || [[ $line == ";"* ]] ;
then
echo "skipping comment or empty line:" $line;
@wachukxs
wachukxs / binarygap.js
Last active December 13, 2019 14:29
Simple solution to binary gap challenge from codility [https://app.codility.com/programmers/lessons/1-iterations/binary_gap/]
function BG(N){
// https://www.w3resource.com/javascript-exercises/javascript-math-exercise-3.php
// https://codepen.io/w3resource/pen/Qxgpzw
// console.log(N, parseInt(N, 10).toString(2)); // N.toString(2) does the trick too
var k = parseInt(N, 10).toString(2);
var t = Array.from(k)
// console.log(t, t.indexOf('0'));
var r = new Array;
@wachukxs
wachukxs / readme.md
Created December 1, 2019 18:41
Sharing codes from Exquis App Factory

Code!