Skip to content

Instantly share code, notes, and snippets.

View jpalala's full-sized avatar
🎯
Focusing

Joe Palala jpalala

🎯
Focusing
View GitHub Profile
@jpalala
jpalala / php-session-handler.php
Created April 1, 2022 02:00
php session handler can be overriden
<?php
SessionHandler implements SessionHandlerInterface , SessionIdInterface {
/* Methods */
public close ( ) : bool
public create_sid ( ) : string
public destroy ( string $id ) : bool
public gc ( int $max_lifetime ) : int|bool
public open ( string $path , string $name ) : bool
public read ( string $id ) : string
public write ( string $id , string $data ) : bool
@jpalala
jpalala / .zshrc
Created March 19, 2022 08:01 — forked from callumlocke/.zshrc
ZSH function to auto-switch to correct Node version
####
# ZSH function to auto-switch to correct Node version
# https://gist.github.com/callumlocke/30990e247e52ab6ac1aa98e5f0e5bbf5
#
# - Searches up your directory tree for the closest .nvmrc, just like `nvm use` does.
#
# - If you are already on the right Node version, IT DOES NOTHING, AND PRINTS NOTHING.
#
# - Works correctly if your .nvmrc file contains something relaxed/generic,
# like "4" or "v12.0" or "stable".
@jpalala
jpalala / aliases-file.sh
Created March 17, 2022 09:24
my aliases file
alias nw="npm run watch"
alias gitpersonal="git config --global user.name 'My Name' && git config --global user.email someone@email.xyz"
PATH_TO_REPOS=/Users/me/somerepos
alias zz="cd $HOME"
alias zdev="cd $HOME/devnotes"
alias cz="cd ../"
alias goup="cd ../"
alias goback="cd -"
alias zdev="cd ~/devnotes"
alias lll="ls -lhatr"
@jpalala
jpalala / gist:b18108f7702387b71fb08d58dc447631
Created March 8, 2022 07:08 — forked from 480/gist:3b41f449686a089f34edb45d00672f28
MacOS X + oh my zsh + powerline fonts + visual studio code terminal settings

MacOS X + oh my zsh + powerline fonts + visual studio code (vscode) terminal settings

Thank you everybody, Your comments makes it better

Install oh my zsh

http://ohmyz.sh/

sh -c "$(curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
@jpalala
jpalala / postgres-brew.md
Created March 8, 2022 07:04 — forked from ibraheem4/postgres-brew.md
Installing Postgres via Brew (OSX)

Installing Postgres via Brew

Pre-Reqs

Brew Package Manager

In your command-line run the following commands:

  1. brew doctor
  2. brew update
@jpalala
jpalala / button2.html
Last active February 25, 2022 15:09
another button
<button class="bg-grey-300 hover:bg-grey-500 text-black font-bold py-2 px-4">
Button
</button>
@jpalala
jpalala / button1.html
Created February 25, 2022 15:06
i am a button
<button class="btn btn-gray">
I am a Button
</button>
@jpalala
jpalala / linux-commandline-things.md
Created February 12, 2022 08:21
basic fun linux things
  • yq / jq yaml and json query tools
  • tig (git)
    • vi-interface to git
  • cowsay echoes a cow with a text above it
@jpalala
jpalala / editExperience.module.js
Created February 8, 2022 05:56
modular nodejs notes
const getDB = require('../../bbdd/db');
const { formatDate, validate } = require('../../helpers');
const {
newSchemaEditExperience,
} = require('../../validations/newSchemaEditExperience');
const editExperience = async (req, res, next) => {
let connection;
let sqlExperience = 'SELECT * FROM experiences';
try {
@jpalala
jpalala / settingup_neovim.md
Last active February 1, 2022 15:06
guide to setting up neovim correctly

After you've installed nvim do an alias so nvim is called automatically:

alias vim=nvim

Apparently the folder ~/.vim needs to be mapped to ~/.config/nvim since that's where nvim lives, then also the .vimrc to the init.vim (recommend: back it up first just in case)