Skip to content

Instantly share code, notes, and snippets.

View FlintSable's full-sized avatar
:octocat:

Nicholas Noochla-or FlintSable

:octocat:
View GitHub Profile
@FlintSable
FlintSable / 0_reuse_code.js
Last active February 25, 2020 18:10
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@FlintSable
FlintSable / helper.py
Last active August 15, 2018 04:07
Basics and helper functions
# output the modules methods
dir(modulename)
# pp print for pretty printing
import pprint
pp = pprint.PrettyPrinter(indent=4)
pp.pprint(whatever)
@FlintSable
FlintSable / bundle.js
Last active November 10, 2017 21:26
setup
// this will create a bundle.js file
// which is a complied app.js
npm run webpack
or
webpack
@FlintSable
FlintSable / clear
Last active October 4, 2017 03:27
sqlite
import os
clear = lambda: os.system('clear') #on Linux System
clear()
import os
clear = lambda: os.system('cls') #on Windows System
clear()
@FlintSable
FlintSable / Terminal_Line_Navigation
Last active October 10, 2019 21:55
line navigation
Ctrl-A: go to the beginning of line
Ctrl-E: go to the end of line
Alt-B: skip one word backward
Alt-F: skip one word forward
Ctrl-U: delete to the beginning of line
@FlintSable
FlintSable / Btemplate.html
Last active December 23, 2017 21:38
basic bootstrap template
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- The above 3 meta tags *must* come first in the head; any other head content must come *after* these tags -->
<title>Bootstrap 101 Template</title>
<!-- Bootstrap -->
mkdir %programdata%\ddrive
reg add "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\DOS Devices" /v d: /d \??\%programdata%\ddrive
psExec \\\\WS886 cmd
psExec \\WS886 cmd
psExec '\\WS886' cmd
https://community.spiceworks.com/how_to/78664-remove-local-printer-on-a-remote-machine
@FlintSable
FlintSable / CheckAdmin.ps1
Last active August 19, 2021 04:08
network share navigation
# Returns tr
$currentPrincipal = New-Object Security.Principal.WindowsPrincipal([Security.Principal.WindowsIdentity]::GetCurrent())
$currentPrincipal.IsInRole([Security.Principal.WindowsBuiltInRole]::Administrator)
@FlintSable
FlintSable / homebrew
Last active September 22, 2017 02:30
Homebrew
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
brew help