Skip to content

Instantly share code, notes, and snippets.

View radiosilence's full-sized avatar
🔥

James Cleveland radiosilence

🔥
View GitHub Profile
{
"workbench.iconTheme": "Monokai Pro Icons",
"editor.fontFamily": "Hack JBM Ligatured",
"editor.fontLigatures": true,
"editor.fontSize": 14,
"editor.formatOnType": true,
"editor.tabCompletion": "on",
"emmet.triggerExpansionOnTab": false,
"typescript.validate.enable": true, // =>
"javascript.validate.enable": true,
Prawn Curry
Chana Dal
x
Ginger Root
X
Brown Rice
Raw Garlic
x
Coriander Leaves
terraform-common: &terraform-common
backend_type: gcs
env_name: development
env:
GOOGLE_CREDENTIALS: ((gcp_concourse_iam))
vars:
region: europe-west2
zone: europe-west2-a
project: kubernetes-cluster-eso
Thu Apr 28 13:34:22 UTC 2022
# plugin manager
# rebind the prefix key
unbind C-b
set-option -g prefix C-a
bind-key C-a send-prefix
# 256 colors
set -g default-terminal "screen-256color"
import { MobXProviderContext } from "mobx-react"
import { useContext } from "react"
import { RootStore } from "../models"
export const useStores = () => {
return useContext(MobXProviderContext)
}
export const useRootStore = (): RootStore => useStores().rootStore
myArray = [{:key => nil, :x => nil}, {:z => nil}, {:potato => "hi", :deep => {:deep => {:deep => "asf" } } } ]
print myArray
print "\n"
potato = "hi"
# IMMUTABLE VERSION: make a new array but with hashes that are either the same exact hash or an updated version
myArray2 = myArray.map do |hash|
hash.key?(:key) ? hash.merge({:key => potato}) : hash
end
#
# Sets Prezto options.
#
# Authors:
# Sorin Ionescu <sorin.ionescu@gmail.com>
#
#
# General
#
- message: test psot 8
id: '220955331788460_220956781788315'
comments:
data:
- message: test comment
id: '220958945121432'
paging:
cursors:
before: >-
WTI5dGJXVnVkRjlqZAFhKemIzSTZANakl3T1RVNE9UUTFNVEl4TkRNeU9qRTFNakl5TlRReE1qVT0ZD
import * as moment from 'moment'
for (let i = 0; i < 12; i++) {
const start = moment('2018-02-28')
console.log(start.add(i * 30, 'd').format('DD MMMM YYYY'))
}