Skip to content

Instantly share code, notes, and snippets.

View alarian's full-sized avatar

Jordan Wright alarian

  • Irving, TX
View GitHub Profile
@alarian
alarian / index.html
Created May 29, 2021 03:59
Responsive Flexbox Thangs
<div class="container">
<form>
<div class="flex-outer">
<div>
<!--<label for="message">Result</label>-->
<textarea rows="3" id="message" placeholder="Enter your message here"></textarea>
</div>
<div>
<div class="flex-inner">
<div>
@alarian
alarian / preRequestScript.js
Created May 13, 2021 20:05 — forked from ptrstpp950/preRequestScript.js
Calculate TOTP in Postman
//Article about TOTP on my blog https://stapp.space/generate-totp-in-postman/
/**
* @preserve A JavaScript implementation of the SHA family of hashes, as
* defined in FIPS PUB 180-4 and FIPS PUB 202, as well as the corresponding
* HMAC implementation as defined in FIPS PUB 198a
*
* Copyright Brian Turek 2008-2017
* Distributed under the BSD License
* See http://caligatio.github.com/jsSHA/ for more information
@alarian
alarian / wget.sh
Created May 2, 2021 14:50 — forked from crittermike/wget.sh
Download an entire website with wget, along with assets.
# One liner
wget --recursive --page-requisites --adjust-extension --span-hosts --convert-links --restrict-file-names=windows --domains yoursite.com --no-parent yoursite.com
# Explained
wget \
--recursive \ # Download the whole site.
--page-requisites \ # Get all assets/elements (CSS/JS/images).
--adjust-extension \ # Save files with .html on the end.
--span-hosts \ # Include necessary assets from offsite as well.
--convert-links \ # Update links to still work in the static version.
Use of keys like Alt, Ctrl, Esc is necessary for working with a CLI terminal. Termux touch keyboards do not include one. For that purpose Termux uses the Volume down button to emulate the Ctrl key. For example, pressing}Volume down+L on a touch keyboard sends the same input as pressing Ctrl+L on a hardware keyboard.
The result of using Ctrl in combination with a key depends on which program is used, but for many command line tools the following shortcuts works:
Ctrl+A → Move cursor to the beginning of line
Ctrl+C → Abort (send SIGINT to) current process
Ctrl+D → Logout of a terminal session
Ctrl+E → Move cursor to the end of line
Ctrl+K → Delete from cursor to the end of line
Ctrl+U → Delete from cursor to the beginning of line
@alarian
alarian / Revealing-Module-Pattern.md
Created April 7, 2021 23:37 — forked from zcaceres/Revealing-Module-Pattern.md
Using the Revealing Module Pattern in Javascript

The Revealing Module Pattern in Javascript

Zach Caceres

Javascript does not have the typical 'private' and 'public' specifiers of more traditional object oriented languages like C# or Java. However, you can achieve the same effect through the clever application of Javascript's function-level scoping. The Revealing Module pattern is a design pattern for Javascript applications that elegantly solves this problem.

The central principle of the Revealing Module pattern is that all functionality and variables should be hidden unless deliberately exposed.

Let's imagine we have a music application where a musicPlayer.js file handles much of our user's experience. We need to access some methods, but shouldn't be able to mess with other methods or variables.

Using Function Scope to Create Public and Private Methods

@alarian
alarian / Remove-ThisPCFolders.reg
Created March 15, 2021 22:28
Remove Folders from This PC
Windows Registry Editor Version 5.00
; Pictures Folder
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\FolderDescriptions\{0ddd015d-b06c-45d5-8c4c-f59713854639}\PropertyBag]
"ThisPCPolicy"="Hide"
; Videos Folder:
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\FolderDescriptions\{35286a68-3c57-41a1-bbb1-0eae73d76c95}\PropertyBag]
"ThisPCPolicy"="Hide"
@alarian
alarian / unicode-notez.md
Last active March 10, 2021 18:35
unicode symbols & notez
<style> h1 { color: red; } </style>

Unicodez


@alarian
alarian / chrome-devtools.md
Created February 10, 2021 00:54 — forked from vbsessa/chrome-devtools.md
How to customize Chrome devtools fonts
  1. Enable #enable-devtools-experiments flag in chrome://flags section.

  2. Open Chorme Devtools and check Settings > Experiments > Allow custom UI themes.

  3. Create the following four files in a dedicated folder.

    3.1. devtools.html

    <html>
    <head></head>
    <body><script src="devtools.js"></script></body>
@alarian
alarian / firefox-devtools.md
Created February 10, 2021 00:54 — forked from vbsessa/firefox-devtools.md
How to customize Firefox devtools fonts
  1. Open ~/.mozilla/firefox/<your_profile>/chrome/userChrome.css (create it if does not exist).

  2. Paste the following content in it.

     @namespace url(http://www.w3.org/1999/xhtml);
     @-moz-document regexp("chrome://browser/content/devtools/**/.*"){
         .devtools-monospace {
             font-family: Consolas, monospace !important;
             font-size: 8pt !important;
         }
    

}

@alarian
alarian / file-svg-export.py
Created February 9, 2021 17:41 — forked from thorsummoner/file-svg-export.py
GIMP Plug-in for Simple SVG Exports
#!/usr/bin/env python
# GIMP Plug-in for Simple SVG Exports
# Copyright (C) 2016 by Dylan Grafmyre <thorsummoner@live.com>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3 of the License, or
# (at your option) any later version.