Skip to content

Instantly share code, notes, and snippets.

View joparara's full-sized avatar
👋
hello world!

Joe Palala joparara

👋
hello world!
View GitHub Profile
@joparara
joparara / hosts
Created September 17, 2024 01:05 — forked from andretw/hosts
Default /etc/hosts on Mac OS X
127.0.0.1 localhost
255.255.255.255 broadcasthost
::1 localhost
fe80::1%lo0 localhost
@joparara
joparara / git.config
Created September 26, 2024 06:23
git alias b
[alias]
b = "!git for-each-ref --sort='-authordate' --format='%(authordate)%09%(objectname:short)%09%(refname)' r efs/heads | sed -e 's-refs/heads/--'"
@joparara
joparara / output_log.txt
Created October 7, 2024 03:22 — forked from HugsLibRecordKeeper/output_log.txt
Rimworld output log published using HugsLib
Log uploaded on Monday, October 7, 2024, 4:17:54 AM
Loaded mods:
Harmony(brrainz.harmony)[mv:2.3.1.0]: 0Harmony(2.3.3), HarmonyMod(2.3.1)
Core(Ludeon.RimWorld): (no assemblies)
Royalty(Ludeon.RimWorld.Royalty): (no assemblies)
Ideology(Ludeon.RimWorld.Ideology): (no assemblies)
Biotech(Ludeon.RimWorld.Biotech): (no assemblies)
Anomaly(Ludeon.RimWorld.Anomaly): (no assemblies)
HugsLib(UnlimitedHugs.HugsLib)[ov:11.0.4]: 0Harmony(av:2.3.3,fv:1.2.0.1), HugsLib(av:1.0.0,fv:11.0.4)
(Dirty) Windows(ANumeric.dirtyWindows): OpenTheWindows(av:2.7.6,fv:2.7.6)
@joparara
joparara / embellished_ll_command.sh
Created October 16, 2024 23:23
embellished ll command
ll will usually ls, but if you add any argument, it will run bat (fzf) (to view the file)
```bash
ll () {
if (( $# == 0 )); then
ls -alF
else
bat $(fzf) $1
fi
}
@joparara
joparara / setting-up-bootstrap-laravel.md
Last active October 21, 2024 23:00
setting up bootstrap laravel.md
  1. Install Laravel

    composer create-project laravel/laravel example-app

  2. Use in project folder

    npm i bootstrap

  3. Copy the css and js folders from the following locations

@joparara
joparara / run_uniqid_node.js
Created October 25, 2024 11:42
nodejs random uniqid
function uniqid(prefix = "", random = false) {
const sec = Date.now() * 1000 + Math.random() * 1000;
const id = sec.toString(16).replace(/\./g, "").padEnd(14, "0");
return `${prefix}${id}${random ? `.${Math.trunc(Math.random() * 100000000)}`:""}`;
};
@joparara
joparara / mysql_downgrade.txt
Created October 28, 2024 01:07 — forked from 6temes/mysql_downgrade.txt
Downgrade MySQL version with brew
# Kill rails server and guard
bin/spring stop
brew services stop mysql
brew uninstall mysql
brew install [email protected]
brew link [email protected] --force
brew services start [email protected]
rbenv uninstall 2.3.3
rbenv install 2.3.3
gem install bundle
@joparara
joparara / readme.md
Created November 14, 2024 03:04
launchdarkly lighter clone

launchdarkly-clone

For a lighter LaunchDarkly-style feature toggling service on AWS, you could focus on these essential features:

Feature Flag Management: Enable users to create, update, and delete feature flags, with options for boolean (on/off), multivariate (e.g., A/B tests), and gradual rollout.

Targeting Rules: Allow users to set rules based on attributes (e.g., user groups, environment, geographic location). This could involve assigning attributes to toggle specific users or cohorts.

Environment Support: Provide support for managing flags across multiple environments (e.g., development, staging, production), allowing easy promotion of configurations between them.

@joparara
joparara / massInsertOrUpdate.php
Created December 11, 2024 23:14 — forked from RuGa/massInsertOrUpdate.php
Mass (bulk) insert or update on duplicate for Laravel 4/5
/**
* Mass (bulk) insert or update on duplicate for Laravel 4/5
*
* insertOrUpdate([
* ['id'=>1,'value'=>10],
* ['id'=>2,'value'=>60]
* ]);
*
*
* @param array $rows
@joparara
joparara / rungradle.md
Last active December 13, 2024 01:50
run gradle

Run

./gradlew wrapper --gradle-version=8.1.1 --distribution-type=bin

Builds to 8.1.1

./build
./uberjar