Skip to content

Instantly share code, notes, and snippets.

View natescode's full-sized avatar
🏠
Working from home

Nate natescode

🏠
Working from home
View GitHub Profile
@natescode
natescode / stringToHTML.js
Created January 26, 2024 02:09
Parse Template String as HTML element
String.prototype.toHtml = function () {
let element = new DOMParser().parseFromString(this, 'text/html').body.firstChild;
return element;
};
@natescode
natescode / .gitconfig
Last active March 1, 2024 02:00
Git Aliases to make GIT easier to work with
[user]
email = your_email
name = your_username
[alias]
# view your global git config Aliases from CLI
aliases = config --get-regexp '^alias\\.'
# git clone
cl = !git clone
# Git shallow clone for large repos
clq= !git clone --depth=1
/**
* Definition for a binary tree node.
* public class TreeNode {
* int val;
* TreeNode left;
* TreeNode right;
* TreeNode() {}
* TreeNode(int val) { this.val = val; }
* TreeNode(int val, TreeNode left, TreeNode right) {
* this.val = val;
@natescode
natescode / cloudSettings
Last active February 3, 2020 22:11
Visual Studio Code Settings Sync Gist
{"lastUpload":"2020-02-03T22:11:30.167Z","extensionVersion":"v3.4.3"}
@natescode
natescode / si.md
Last active September 25, 2019 18:33
Silicon / Sigil Language Definition

Si

Comments

// Single Line

/*
    Multi-Line

Comment

@natescode
natescode / blogs
Last active August 7, 2019 16:51
FIRE Resources
{
"blogs": {
"Mr Money Mustache": {
"id": 1,
"title": "Mr. Money Mustache",
"tags": ["personal finance", "FIRE"],
"url": "http://www.mrmoneymustache.com",
"description": "Face punching mustachian advice from personal finance and lifestyle guru",
"author": "Mr. Money Mustache",
"location": "Longmont, Colorado",
@natescode
natescode / cloudSettings
Last active November 9, 2021 23:12
VSCODE Settings
{"lastUpload":"2021-11-09T23:12:18.930Z","extensionVersion":"v3.4.3"}
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"></script>
<title>Sandbox</title>
<meta http-equiv="Content-type" content="text/html; charset=utf-8" />
<style type="text/css" media="screen">
body { background-color: #000; font: 16px Helvetica, Arial; color: #fff; }
</style>
@natescode
natescode / Sum_Channels.go
Last active March 20, 2021 03:53
Golang Channels
package main
import "fmt"
func sum(s []int, c chan int) {
sum := 0
for _, v := range s {
sum += v
}
c <- sum // send sum to c