Skip to content

Instantly share code, notes, and snippets.

View Hendrixer's full-sized avatar

Scott Moss Hendrixer

View GitHub Profile
@Hendrixer
Hendrixer / vsconfig.json
Created June 12, 2023 21:53
vs code config
{
"workbench.iconTheme": "vscode-icons",
"workbench.colorTheme": "One Dark Pro Darker",
"editor.tabSize": 2,
"editor.fontFamily": "'Fira Mono', Menlo, Monaco, 'Courier New', monospace",
"files.exclude": {
"**/.git": false
},
"editor.bracketPairColorization.enabled": true,
did:3:kjzl6cwe1jw147jie9e6u5lt64g5sioezf0v09e75xj2q9xfu82cvmqvpmhwo73
@Hendrixer
Hendrixer / index.html
Created August 14, 2020 18:55
Vanilla List
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<style>
* {
box-sizing: border-box;
}
body, html {
@Hendrixer
Hendrixer / machine.js
Last active April 28, 2020 23:44
Generated by XState Viz: https://xstate.js.org/viz
// Available variables:
// - Machine
// - interpret
// - assign
// - send
// - sendParent
// - spawn
// - raise
// - actions
idle*
fetchSchema -> fetchingSchema
fetchDocuments -> fetchingDocuments
reset -> idle
fetchingSchema
success -> idle
failure -> error
empty -> idleEmpty
fetchingDocuments
success -> idle
@Hendrixer
Hendrixer / req.lua
Created December 6, 2017 22:42
custom lambda plugin kong
local res, err = client:request {
method = "POST",
path = request.url,
body = request.body,
headers = request.headers
}
if not res then
return responses.send_HTTP_INTERNAL_SERVER_ERROR(err)
end
@Hendrixer
Hendrixer / .bash_profile
Created June 11, 2017 16:39
bash colors
green=$'\e[1;32m'
teal=$'\e[1;36m'
magenta=$'\e[1;35m'
normal_colors=$'\e[m'
export GITAWAREPROMPT=~/.bash_theme
source $GITAWAREPROMPT/main.sh
export PS1="\[$txtpur\]\u:\[$teal\][\w]:\[$green\]\$git_branch\[$txtred\]\$git_dirty\[$txtred\] <%>\[$normal_colors\] "
export SUDO_PS1="\[$bakred\]\u@\h\[$txtrst\] \w\$ "
@Hendrixer
Hendrixer / editor.css
Last active November 13, 2024 17:09
VS code custom CSS for theme
.composite-title, .composite-title, .vs-dark .monaco-workbench>.activitybar>.content {
background-color: rgba(40, 44, 52, 1) !important;
}
.tabs-container, .tab, .tab.active, .title-actions, .tablist, .tabs-container, .tabs, .composite.title {
background-color: rgba(40, 44, 52, 1) !important;
}
.tab.active, .tab {
border-right: 0px !important;
@Hendrixer
Hendrixer / InstallMissingModules.js
Created August 28, 2016 19:17
list and install npm packages before webpack build
const thenify = require('thenify')
const webpack = require('webpack')
const MemoryFS = require('memory-fs')
const validateNpmPackageName = require('validate-npm-package-name')
class InstallMissingModules {
constructor(options) {
this.options = options
}
@Hendrixer
Hendrixer / Simple Reactive Store with Angular 2
Last active November 29, 2016 07:37
Simple reactive store
Angular 2 uses observables for many features and has a peer dependency on [RxJs](http://reactivex.io/rxjs/) for its robust API around observables. The community has adopted a single store approach for dealing with state in modern applications. Let's build a store for our Angular applications that is both reactive and easy to use with RxJs.
## Single store is awesome
We'll create this store with intentions on it being the only store in our app. By doing this, we can provide a better experience and lower the difficulty of reasoning about state in our app, because all the state is in one place! First we'll create the [provider](https://angular.io/docs/ts/latest/guide/dependency-injection.html#!#injector-providers) for the store itself.
```typescript
export class AppStore {}
```