Skip to content

Instantly share code, notes, and snippets.

View bgoonz's full-sized avatar
🎯
learning

Bryan C Guner bgoonz

🎯
learning
View GitHub Profile
@bgoonz
bgoonz / add-to-any.html
Last active January 30, 2021 03:29
add-to-any-share-buttons
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<style>
/* Hide AddToAny vertical share bar when screen is less than 980 pixels wide */
@media screen and (max-width: 980px) {
.a2a_floating_style.a2a_vertical_style { display: none; }
@bgoonz
bgoonz / useful-commands.md
Last active January 30, 2021 03:47
useful-commands.md

Remove empty files, empty folders and git folders(USE WITH CAUTION):

find . -empty -type f -print -delete
find . -empty -type d -print -delete

find . \( -name ".git" -o -name ".gitignore" -o -name ".gitmodules" -o -name ".gitattributes" \) -exec rm -rf -- {} +

@bgoonz
bgoonz / backup.py
Last active May 22, 2022 21:54
backup-windows.py
import subprocess
import logging
import shutil
import os
import stat
import errno
import platform
from sys import exit
const Promise = require( 'bluebird' );
const fs = Promise.promisifyAll( require( 'fs' ) );
const crypto = require( 'crypto' );
const path = require( 'path' );
const pathA = ".";
const pathB = "/path/to/the/directory/you/want/to/compare/it/to";
let hashes = [];
function hashDirIn ( folder ) {
var pathPromiseA = fs.readdirAsync( folder ).map( function ( fileName ) {
var workPath = path.join( folder, fileName );
@bgoonz
bgoonz / json-jupyter.ipynb
Created February 7, 2021 05:26
json-jupyter.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@bgoonz
bgoonz / fast-fourier-transform.ipynb
Created February 7, 2021 05:26
fast-fourier-transform.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
#! /bin/python3
#
# Search for keywords in files reachable from current directory.
from sys import argv
from os.path import basename
import readline
from subprocess import run, PIPE
@bgoonz
bgoonz / node.js
Last active February 10, 2021 12:43
node-cheat-sheet
/*************************
* //NODE-JS-CHEAT-SHEET *
*************************/
var http = require('http');
// An example of a web server written with Node which responds with 'Hello World'.
// To run the server, put the code into a file called example.js and execute it with the node program.
http.createServer(function (request, response) {
response.writeHead(200, {'Content-Type': 'text/plain'});
response.end('Hello World\n');
}).listen(8124);
@bgoonz
bgoonz / emmet.md
Last active February 10, 2021 12:42
emmet-cheatsheet

EMMET

The essential toolkit for web-developers

Introduction

Emmet is a productivity toolkit for web developers that uses expressions to generate HTML snippets.

Installation

Normally, installation for Emmet should be a straight-forward process from the package-manager, as most of the modern text editors support Emmet. If you have difficulty setting up emmet with your editor and wish to check Emmet is supported by your favourite editor or not, you can check it from here. Emmet Installation instructions

Usage

@bgoonz
bgoonz / sequelize-cheatsheet.md
Last active April 5, 2024 17:59
sequelize-cheat-sheetmd

Sequelize Cheatsheet

Command Line

Sequelize provides utilities for generating migrations, models, and seed files. They are exposed through the sequelize-cli command.

Init Project

$ npx sequelize-cli init