Skip to content

Instantly share code, notes, and snippets.

package main
import (
"fmt"
"github.com/spf13/cobra"
"github.com/spf13/viper"
)
func main() {
○ Unicode:
§ Unicode comprises over one million characters divided in 17 different planes (contiguous groups of characters): BMP are mostly everyday characters, Astral, etc.
§ Astral characters include emojis but they aren't well supported because they are considered two characters, so regexes that use them may often work in unexpected ways.
§ Use the /u flag in ES6 to overcome this. Use it with caution.
○ El codigo es dato
§ Harvard architecutre: code + data in different places
§ Von Neuman architecture: code + data in the same place (it won)
○ Ethereum:
§ Ether is the cryptocurrency
§ Blockchain: records that store the transactions
@ghinda
ghinda / object-to-form-data.js
Last active March 30, 2024 18:51
JavaScript Object to FormData, with support for nested objects, arrays and File objects. Includes Angular.js usage.
// takes a {} object and returns a FormData object
var objectToFormData = function(obj, form, namespace) {
var fd = form || new FormData();
var formKey;
for(var property in obj) {
if(obj.hasOwnProperty(property)) {
if(namespace) {
@staringispolite
staringispolite / asciiputsonglasses
Last active March 22, 2024 06:39
Ascii art sunglasses meme
Puts on glasses:
(•_•)
( •_•)>⌐■-■
(⌐■_■)
Takes off glasses ("mother of god..."):
(⌐■_■)
( •_•)>⌐■-■
@joefitzgerald
joefitzgerald / win-updates.ps1
Created December 31, 2013 23:18
Install All Windows Updates, Rebooting As Many Times As Required
param($global:RestartRequired=0,
$global:MoreUpdates=0,
$global:MaxCycles=10)
function Check-ContinueRestartOrEnd() {
$RegistryKey = "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Run"
$RegistryEntry = "InstallWindowsUpdates"
switch ($global:RestartRequired) {
0 {
$prop = (Get-ItemProperty $RegistryKey).$RegistryEntry