Skip to content

Instantly share code, notes, and snippets.

View thinkstylestudio's full-sized avatar

Theron Smith thinkstylestudio

View GitHub Profile
@MrPunyapal
MrPunyapal / LaravelWhereLikeMacro.php
Last active April 12, 2024 03:32
Laravel Custom 'whereLike' Macro for Dynamic 'LIKE' Searches including relationships
<?php
namespace App\Providers;
use Illuminate\Database\Eloquent\Builder;
use Illuminate\Support\Arr;
use Illuminate\Support\ServiceProvider;
class AppServiceProvider extends ServiceProvider
{
@chezou
chezou / kinesis_freestyle2.json
Created September 3, 2018 02:57
Karabiner-Elements setting for Kinesis freestyle2 only for Windows version with disabling for Mac. `location_id` should be replaced for your Kinesis freestyle2.
{
"title": "Kinesis Freestyle2",
"rules": [
{
"description": "Swap only for Windows",
"manipulators": [
{
"conditions": [
{
"type": "device_if",
@BenSampo
BenSampo / deploy.sh
Last active April 20, 2024 23:54
Laravel deploy script
# Change to the project directory
cd $FORGE_SITE_PATH
# Turn on maintenance mode
php artisan down || true
# Pull the latest changes from the git repository
# git reset --hard
# git clean -df
git pull origin $FORGE_SITE_BRANCH
@AALMA
AALMA / massInsertOrUpdate.php
Last active September 25, 2020 07:04 — forked from RuGa/massInsertOrUpdate.php
Mass (bulk) insert or update on duplicate for Laravel 4/5
<?php
namespace App\Traits;
use DB;
use Carbon\Carbon;
trait MassInsertOrUpdate
{
protected $insert_or_update_chunk_size = 1000;
** Apache
- Edit public/.htaccess of laravel application with wordpress in subfolder
<IfModule mod_rewrite.c>
<IfModule mod_negotiation.c>
Options -MultiViews
</IfModule>
RewriteEngine On
# Redirect Trailing Slashes If Not A Folder...
@mvisonneau
mvisonneau / gitlab_to_jira.py
Created August 11, 2017 15:54
GitLab to Jira issue sync
#!/usr/bin/env python
import gitlab
from jira import JIRA
import urllib3
## Disable urllib3 ssl checks warnings
urllib3.disable_warnings( urllib3.exceptions.InsecureRequestWarning )
## GitLab config
@uran1980
uran1980 / how-to-upgrade-php-from-5.6-to-7.1-on-macos-sierra-with-homebrew.md
Last active February 6, 2022 05:29
How to upgrade php from 5.6 to 7.1 on macOS Sierra with homebrew
@JMichaelVelasquez
JMichaelVelasquez / migration-bitbucket-to-github
Created November 27, 2016 21:03
Migrating from BitBucket to GitHub
If you’re anything like me who didn't want to pay for github before their new business strategy, then most likely you use BitBucket or hosted your own (come ‘on, it was free!). Problem with that is now your activities or contributions are fragmented between the different services. Now that I've chosen GitHub, I found myself migrating the git repos.
Here is my copy and paste script I use for migration which also carries your history, which without it, defeats the purpose of it!
$ cd ~/Sites/repo-directory
$ git remote rename origin bitbucket
$ git remote add origin git@github.com:JMichaelVelasquez-change-user/your-new-repo.git
$ git push origin master
@cviebrock
cviebrock / ElasticLoggingProvider.php
Created September 29, 2016 14:57
Log Laravel to Elastic/Logstash
<?php namespace App\Providers;
use Elastica\Client;
use Illuminate\Support\ServiceProvider;
use Monolog\Formatter\LogstashFormatter;
use Monolog\Handler\ElasticSearchHandler;
class ElasticLoggingProvider extends ServiceProvider
{
@adamwathan
adamwathan / troubleshooting.md
Last active January 19, 2021 04:14
Troubleshooting Valet on macOS Sierra

Troubleshooting Valet on Sierra

Common Problems

Problem: I just see "It works!"

Apache is running on port 80 and interfering with Valet.

  1. Stop Apache: sudo /usr/sbin/apachectl stop
  2. Restart Valet: valet restart