layout | title | permalink |
---|---|---|
checklist_page |
The Side Project Marketing Checklist |
/marketing-checklist/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# USEFULL STUFF | |
# do something n times without index | |
10.times { puts "hello" } | |
# n times block with index | |
-5.upto(5) { |indx| puts indx } | |
# iterate over array with n elements of array | |
# will decrease the number of iterations by (n-1) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'bitcoin' | |
key = nil | |
addr = "" | |
iteration = 0 | |
pattern = "Thomas" | |
until addr.start_with?("1#{pattern}") | |
key = Bitcoin::Key.generate | |
addr = key.addr |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"workbench.colorCustomizations": { | |
// Contrast Colors - The contrast colors are typically only set for high contrast themes. If set, they add an additional border around items across the UI to increase the contrast. | |
"contrastActiveBorder": "", | |
"contrastBorder": "", | |
// Base Colors | |
"focusBorder": "", | |
"foreground": "", | |
"widget.shadow": "", | |
"selection.background": "", | |
"descriptionForeground": "", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Calculate the center/average of multiple GeoLocation coordinates | |
* Expects an array of objects with .latitude and .longitude properties | |
* | |
* @url http://stackoverflow.com/a/14231286/538646 | |
*/ | |
function averageGeolocation(coords) { | |
if (coords.length === 1) { | |
return coords[0]; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function uuid () { | |
function getRandomSymbol (symbol) { | |
var array; | |
if (symbol === 'y') { | |
array = ['8', '9', 'a', 'b']; | |
return array[Math.floor(Math.random() * array.length)]; | |
} | |
array = new Uint8Array(1); |
-
CTRL + A
— Move to the beginning of the line -
CTRL + E
— Move to the end of the line -
CTRL + [left arrow]
— Move one word backward (on some systems this is ALT + B) -
CTRL + [right arrow]
— Move one word forward (on some systems this is ALT + F) -
CTRL + U
— (bash) Clear the characters on the line before the current cursor position -
CTRL + U
—(zsh) If you're using the zsh, this will clear the entire line -
CTRL + K
— Clear the characters on the line after the current cursor position -
ESC + [backspace]
— Delete the word in front of the cursor
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { Grid } from 'gridjs-react'; | |
import { useRef } from "react"; | |
const MyComponent = () => { | |
const gridRef = useRef(); | |
const changeMyGrid = () => { | |
const gridjsInstance = gridRef.current.getInstance(); | |
// update col names | |
gridjsInstance.updateConfig({ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import cloudscraper | |
import json | |
def filter_typename(dict): | |
return dict["__typename"] == "AssetQuantityType" | |
def filter_quantityInEth_exists(dict): | |
if "quantityInEth" in dict: | |
return True | |
else: |
OlderNewer