Skip to content

Instantly share code, notes, and snippets.

View BerkeleyTrue's full-sized avatar
💭
Baby Yoda is my spirit animal

Berkeley Martinez BerkeleyTrue

💭
Baby Yoda is my spirit animal
View GitHub Profile
@BerkeleyTrue
BerkeleyTrue / gfold.log
Created May 16, 2022 15:41
GFOLD_4_DEBUG
[2022-05-16T15:39:47Z DEBUG gfold] initialized logger
[2022-05-16T15:39:47Z DEBUG gfold::cli] collected args
[2022-05-16T15:39:47Z DEBUG gfold::cli] loaded initial config
[2022-05-16T15:39:47Z DEBUG gfold::cli] finalized config options
[2022-05-16T15:39:47Z DEBUG gfold::report::target] found target: "/home/berkeleytrue/dvlpmnt/workstation"
[2022-05-16T15:39:47Z DEBUG gfold::report::target] found target: "/home/berkeleytrue/dvlpmnt/zsh/ghanima"
[2022-05-16T15:39:47Z DEBUG gfold::report::target] found target: "/home/berkeleytrue/dvlpmnt/completion-nvim"
[2022-05-16T15:39:47Z DEBUG gfold::report::target] found target: "/home/berkeleytrue/dvlpmnt/keyboards/qmk_firmware_back"
[2022-05-16T15:39:47Z DEBUG gfold::report::target] found target: "/home/berkeleytrue/dvlpmnt/projects/foe"
[2022-05-16T15:39:47Z DEBUG gfold::report::target] found target: "/home/berkeleytrue/dvlpmnt/nvim-treesitter"
@BerkeleyTrue
BerkeleyTrue / lsp.log
Last active March 10, 2022 02:05
Lsp log for html emmet style
[START][2022-03-09 18:04:36] LSP logging initiated
[INFO][2022-03-09 18:04:36] .../vim/lsp/rpc.lua:261 "Starting RPC client" {
args = { "--stdio" },
cmd = "tailwindcss-language-server",
extra = {
cwd = "/home/berkeleytrue/dvlpmnt/node/apps/berkeleytrue.com"
}
}
[TRACE][2022-03-09 18:04:36] .../lua/vim/lsp.lua:892 "LSP[tailwindcss]" "initialize_params" {

Keybase proof

I hereby claim:

  • I am berkeleytrue on github.
  • I am berkeleytrue (https://keybase.io/berkeleytrue) on keybase.
  • I have a public key ASD1MZchoq-cqZLSU9kXEzrmAeDyVXR_DI9v_bk_19me8Qo

To claim this, I am signing this object:

@BerkeleyTrue
BerkeleyTrue / .travis.yml
Created June 5, 2018 03:35
greenkeeper lockfile install with npm ci
language: node_js
node_js:
- '8'
- '10'
before_install:
- if [[ `npm -v` != 6* ]]; then npm install -g npm@6; fi
- npm install -g greenkeeper-lockfile
@BerkeleyTrue
BerkeleyTrue / LoopbackSync.md
Last active May 23, 2018 07:23
Loopback Replication/Synchronization

Loopback Sync

Sync in Loopback requires Loopback in the client as well the server.

Loopback attaches a replicate method to each Model Class. Lets say I define a model called 'RemoteMat' in my loopback server. In my client loopback app, I define a local varient of this model called 'LocalMat'.

My app would use Browserify to package Loopback for the client.

On first app load, I would call a Bi-direction replication (or syncronization) method. This is currently not implament in Loopback but it is easy to create. I will go into more detials later.

class MyComponent extends React.Component {
constructor() {
this.handleClick = this.handleClick.bind(this);
}
handleClick(e) {
console.log('Parameter', this.props.param);
console.log('Event', e);
}
@BerkeleyTrue
BerkeleyTrue / event-handlers-with-parameters-bind-constructor.js
Last active November 30, 2017 18:56 — forked from sanketmeghani/event-handlers-with-parameters-bind-constructor.js
React event handler with parameters using bind in constructor
class MyComponent extends React.Component {
constructor() {
this.handleClick = this.handleClick.bind(this, 'Parameter');
}
handleClick(param, e) {
console.log('Parameter', param);
console.log('Event', e);
}
@BerkeleyTrue
BerkeleyTrue / .profile
Created September 2, 2017 03:12
Checkout remote pull request
gcorpullrequest() {
# gcorpullrequest 123 upstream
# gcorpullrequest 124
remote=origin
echo "What do you want to call the local branch?"
read branchname
if [ $# = 2 ]; then
{
"title": "SpaceKeys",
"rules": [
{
"description": "l/r shift => ()",
"manipulators": [
{
"description": "Change left shift press to (",
"from": {
"key_code": "left_shift",
@BerkeleyTrue
BerkeleyTrue / ipMap.sh
Last active July 20, 2017 23:09
Redirect a url to a localhost port
# First we need to map our localhost + port combo to another ip. You'll need root priviliges for this
sudo ifconfig lo0 10.0.0.1 alias && \
echo "rdr pass on lo0 inet proto tcp from any to 10.0.0.1 port 80 -> 127.0.0.1 port 3000" | sudo pfctl -ef -
# Now edit /etc/hosts
sudo vim /etc/hosts
# and add the following to the list
# NOTE: Do not edit anthing on this list you did not add
10.0.0.1 mydomain.dev
10.0.0.1 www.mydomain.dev
# I choose to use a .dev TLD as these are never going to conflict seeing how google has bought these TLD's