Skip to content

Instantly share code, notes, and snippets.

View joparara's full-sized avatar

Joe Palala joparara

View GitHub Profile
@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 / 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 / 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 / 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 / std.md
Created June 24, 2024 03:00 — forked from turbo/std.md
Git Commit Message Standard

Merged from https://github.com/joelparkerhenderson/git_commit_message and https://chris.beams.io/posts/git-commit/

General Rules

  • Commit messages must have a subject line and may have body copy. These must be separated by a blank line.
  • The subject line must not exceed 50 characters
  • The subject line should be capitalized and must not end in a period
  • The subject line must be written in imperative mood (Fix, not Fixed / Fixes etc.)
  • The body copy must be wrapped at 72 columns
  • The body copy must only contain explanations as to what and why, never how. The latter belongs in documentation and implementation.
@joparara
joparara / gist:0e3fd6ea723267a9e5b543ff7f69bbd0
Created June 12, 2024 06:49 — forked from djaiss/gist:85a0ada83e6bca68e41e
Block Twitter/Facebook in your /etc/hosts
# Block Facebook IPv4
127.0.0.1 www.facebook.com
127.0.0.1 facebook.com
127.0.0.1 login.facebook.com
127.0.0.1 www.login.facebook.com
127.0.0.1 fbcdn.net
127.0.0.1 www.fbcdn.net
127.0.0.1 fbcdn.com
127.0.0.1 www.fbcdn.com
127.0.0.1 static.ak.fbcdn.net
@joparara
joparara / TailLog.php
Created May 25, 2024 00:04 — forked from spidgorny/TailLog.php
Display only the last error from the Laravel log file and simplify output so that it fits the single screen output. Like "tail -f storage/logs/laravel.log", but smart
<?php
namespace App\Console\Commands;
use Illuminate\Console\Command;
use Illuminate\Support\Facades\Storage;
class TailLog extends Command
{
/**
@joparara
joparara / Dockerfile
Created May 13, 2024 00:45 — forked from alext234/Dockerfile
A simple ubuntu container with gcc and cmake
FROM ubuntu:xenial
MAINTAINER alex
# update and install dependencies
RUN apt-get update \
&& apt-get install -y \
software-properties-common \
wget \
&& add-apt-repository -y ppa:ubuntu-toolchain-r/test \
&& apt-get update \
@joparara
joparara / deploy-laravel-app.sh
Created May 12, 2024 03:36 — forked from ChrisHardie/deploy-laravel-app.sh
Simple Bash script to deploy a Laravel App
#!/bin/bash
version=`php artisan --version`
if [[ ${version} != *"Laravel Framework"* ]]; then
echo "Not a Laravel app, exiting."
exit;
fi
# Turn on maintenance mode