Skip to content

Instantly share code, notes, and snippets.

View raymadrona's full-sized avatar

Ray Anthony Madrona raymadrona

View GitHub Profile
@raymadrona
raymadrona / SignatureExample.php
Created February 2, 2022 08:02 — forked from jonneroelofs/SignatureExample.php
Wrapping SignaturePad and storing base-64 with Alpine.js and Laravel Livewire
<?php
namespace App\Http\Livewire;
use Illuminate\Support\Str;
use Livewire\Component;
class SignatureExample extends Component
{
public $signature;
@raymadrona
raymadrona / git-cleanup-repo
Created January 15, 2021 00:36 — forked from robmiller/git-cleanup-repo
A script for cleaning up Git repositories; it deletes branches that are fully merged into `origin/master`, prunes obsolete remote tracking branches, and as an added bonus will replicate these changes on the remote.
#!/bin/bash
# git-cleanup-repo
#
# Author: Rob Miller <rob@bigfish.co.uk>
# Adapted from the original by Yorick Sijsling
git checkout master &> /dev/null
# Make sure we're working with the most up-to-date version of master.
git fetch
@raymadrona
raymadrona / gist:76daa8f4c33ff8b6517e49d7b0ab6c0c
Created December 4, 2020 08:55 — forked from somandubey/gist:52bff8c7cc8639292629
How to increase ulimit in Linux

How to increase ulimit in Linux:

  • Step 1 (ulimit): open the sysctl.conf and add this line fs.file-max = 65536

      vi /etc/sysctl.conf   
    

    add following at end of file in above file:

      fs.file-max = 65536
    

save and exit.

@raymadrona
raymadrona / cmder.md
Last active April 17, 2020 14:36 — forked from nickautomatic/cmder.md
Setting up Cmder to use bash by default

Set up cmder to use msysgit / bash by default

  • Install cmder_mini (msysgit is already installed, so no need for full version)
  • In Cmder, open settings: Win + Alt + P
  • Under Startup > Tasks, add a task called {bash} with the following settings:
    • Task parameters (set icon):
      • For Cmder icon: /icon "%CMDER_ROOT%\cmder.exe"
      • For Git icon: /icon "C:\Program Files\Git\mingw64\share\git\git.ico"
    • Commands (open Git's bash shell):
  • "C:\Program Files\Git\bin\sh.exe" -l -new_console:d:%USERPROFILE%
{"lastUpload":"2020-10-20T06:34:57.191Z","extensionVersion":"v3.4.3"}
@raymadrona
raymadrona / .gitlab-ci.sh
Last active July 26, 2018 07:36
Laravel Gitlab Continuous Integration (CI) Configuration Scripts with PHP 7.2 and MySQL 5.7
#!/bin/bash
# Install dependencies only for Docker.
[[ ! -e /.dockerinit ]] && [[ ! -e /.dockerenv ]] && exit 0
set -xe
# Update packages and install composer and PHP dependencies.
apt-get update -yqq > /dev/null
apt-get install wget git libcurl4-gnutls-dev libicu-dev libmcrypt-dev libvpx-dev libjpeg-dev libpng-dev libxpm-dev zlib1g-dev libfreetype6-dev libxml2-dev libexpat1-dev libbz2-dev libgmp3-dev libldap2-dev unixodbc-dev libpq-dev libsqlite3-dev libaspell-dev libsnmp-dev libpcre3-dev libtidy-dev -yqq > /dev/null
#http://backendtime.com/setup-laravel-homestead-windows/
vagrant plugin install vagrant-winnfsd
folders:
- map: ~/Projects
to: /home/vagrant/Code
type: "nfs"
mount_options: ['nolock,vers=3,udp,noatime']
@raymadrona
raymadrona / forge.sh
Created May 4, 2018 00:15
Laravel Forge Setup Script
#
# REQUIRES:
# - server (the forge server instance)
# - event (the forge event instance)
# - sudo_password (random password for sudo)
# - db_password (random password for database user)
# - callback (the callback URL)
#
@raymadrona
raymadrona / no-bom.ps1
Created May 2, 2018 06:32 — forked from arebee/no-bom.ps1
PowerShell script to save as UTF-8 without a BOM
gci . -recurse -filter *.ps* | % {
$MyFile = gc $_.Fullname -raw
$MyPath = $_.Fullname
[System.IO.File]::WriteAllLines($MyPath, $MyFile, [System.Text.UTF8Encoding]($False))
}
https://jakearchibald.com/2014/offline-cookbook/#on-network-response