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 / Components
Last active October 4, 2017 03:30
Components
<Link to={{
pathname: '/cources',
search: '?sort=name',
hash: '#the-hash',
state: { fromDashboard: true }
}}>
Courses
</Link>
font-family: Helvetica, Arial, Sans-Serif
text-decoration: underline;
text-transform: uppercase;
text-align: center, left, right;
font-size: 60px;
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<link href='//fonts.googleapis.com/css?family=Varela+Round' rel='stylesheet' type='text/css'>
<link rel="stylesheet" href="css/main.css">
<title>AJAX with JavaScript</title>
<script>
// create the http request object
var xhr = new XMLHttpRequest();
# list the updates
Softwareupdate -l
# Install a specific update by name, note the space after the hyphen is needed
sudo softwareupdate -i "macOS Mojave 10.14.6 Supplemental Update 2- "
@FlintSable
FlintSable / ArrayMethodsParagraph.js
Last active November 26, 2018 19:18
Javascript tricks
let secretMessage = ["Learning", "isn't", "about", "what", "you", "get", "easily", "the", "first", "time,", "it's", "about", "what", "you", "can", "figure", "out.", "-2015,", "Chris", "Pine,", "Learn", "JavaScript"];
secretMessage.pop();
secretMessage.push('to', 'program');
secretMessage[6] = 'right';
secretMessage.shift();
secretMessage.unshift('Programming');
secretMessage.splice(6, 4, 'know');
console.log(secretMessage.join(" "));
:: compile and rename to hello
g++ hello.cpp -o hello
g++ -Wall -std=c++14 hello.cpp -o hello
:: execute the compiled code
./hello
# list the files and file sizes in current directory
du -h --max-depth=1
# list the files and file sizes in a specific directory
du -h --max-depth=1 /usr
# swap space
swapon -s
# Listing all the partitions on the hard disk and their mount points by using the mount command.
@FlintSable
FlintSable / Login
Last active February 21, 2020 20:22
# login as root
su -
sudo -s
::Run the below Robocopy command to copy directory structure i.e
::deep copy of folder hierarchy and the data in all the subfolders.
Robocopy /S D:\dir1\data E:\backup\data
:: if you do this "D:\dir1\my data\" because of the \" that will be seen as an escape
:: and you will be left without the final "
class Contact:
""" example that uses an inner (nested) class """
# class ("static") members and intended constants
DEFAULT_NAME = "(no name assigned)"
MIN_NAME_LEN = 2
MAX_NAME_LEN = 30
DEFAULT_PH_NUM = "0001112222"
# initializer ("constructor") method -------------------------------