Skip to content

Instantly share code, notes, and snippets.

Avatar
🔥

James Cleveland radiosilence

🔥
View GitHub Profile
View vscode.json
{
"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,
View gist:c99a79d4e652142895559b74982bb360
Prawn Curry
Chana Dal
x
Ginger Root
X
Brown Rice
Raw Garlic
x
Coriander Leaves
View eso-infrastructure-pipeline.yml
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
View bumpme
Thu Apr 28 13:34:22 UTC 2022
View gist:407e5a3a7ca5654b0e29709de2427bf8
# 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"
View useStores.ts
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
View immutable-vs-mutatable.rb
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
View .zpreztorc
#
# Sets Prezto options.
#
# Authors:
# Sorin Ionescu <sorin.ionescu@gmail.com>
#
#
# General
#
View backup.yml
- message: test psot 8
id: '220955331788460_220956781788315'
comments:
data:
- message: test comment
id: '220958945121432'
paging:
cursors:
before: >-
WTI5dGJXVnVkRjlqZAFhKemIzSTZANakl3T1RVNE9UUTFNVEl4TkRNeU9qRTFNakl5TlRReE1qVT0ZD
View gist:962dda928a35616e514bd806098645be
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'))
}