Skip to content

Instantly share code, notes, and snippets.

View helmerdavila's full-sized avatar
🏠
Working from home

Helmer helmerdavila

🏠
Working from home
View GitHub Profile
@ZekunZh
ZekunZh / copy_all_except_one_folder.md
Created November 23, 2018 16:19
Copy all contents in one folder except one file/sub-folder

rsync -av --progress source_folder/* dest_folder/ --exclude folder_to_exclude/ -n

Use -n for dry run to see what will be copied, then remove -n to do real copy.

@JeffreyWay
JeffreyWay / PjaxMiddleware.php
Last active February 24, 2024 13:40
Laravel middleware for working with pjax.
<?php
namespace App\Http\Middleware;
use Closure;
use Illuminate\Http\Request;
use Illuminate\Http\Response;
use Symfony\Component\DomCrawler\Crawler;
class PjaxMiddleware
@furkanmustafa
furkanmustafa / SimpleICS.php
Last active May 16, 2023 12:42
Simple ICS Generation class for PHP
<?php /*
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
@acdvorak
acdvorak / tmux-all-panes.sh
Last active August 6, 2021 17:09 — forked from yubink/inall.sh
tmux: run a command in all panes
#!/bin/bash
# Runs the specified command (provided by the first argument) in all tmux panes
# in every window. If an application is currently running in a given pane
# (e.g., vim), it is suspended and then resumed so the command can be run.
all-panes()
{
all-panes-bg_ "$1" &
}
@laracasts
laracasts / ApiTester.php
Created April 9, 2014 23:53
Incremental APIs: Level 9 - Tests (Readable Ones!)
<?php
use Faker\Factory as Faker;
class ApiTester extends TestCase {
/**
* @var Faker
*/
protected $fake;
@msurguy
msurguy / List.md
Last active April 30, 2024 15:14
List of open source projects made with Laravel

Other people's projects:

My projects (tutorials are on my blog at http://maxoffsky.com):

@xjamundx
xjamundx / canvas-upload.php
Created February 26, 2011 16:13
php canvas base64 png decoder
<?php
// requires php5
define('UPLOAD_DIR', 'images/');
$img = $_POST['img'];
$img = str_replace('data:image/png;base64,', '', $img);
$img = str_replace(' ', '+', $img);
$data = base64_decode($img);
$file = UPLOAD_DIR . uniqid() . '.png';
$success = file_put_contents($file, $data);