Skip to content

Instantly share code, notes, and snippets.

Avatar
🎵
git push it, git push it real good

Eric Barnes ericlbarnes

🎵
git push it, git push it real good
View GitHub Profile
@ericlbarnes
ericlbarnes / PewPewPew.php
Created May 7, 2020
Hold up... Wait a minute... It's a Laravel Chopper
View PewPewPew.php
<?php
namespace App\Console\Commands;
use Illuminate\Console\Command;
class PewPewPew extends Command
{
protected $signature = 'pewpewpew';
protected $description = 'Command description';
@ericlbarnes
ericlbarnes / beartagcons.txt
Created Jan 6, 2018
A list of all the Bear Writing app sidebar icons
View beartagcons.txt
#android
#apple
#apple watch#
#bear
#comics
* saitama
* one punch man
* one-punch man
* one punch-man
* onepunch-man
View gist:acc49256ebe4859f6553a60baabc9fd3
Trying to filter "out of office" emails from my inbox as I receive a lot of them when I send a blast.
I need help - what do your "out of office" emails say in your langauge? Comment Below!
## Gmail Filter
("Automatische Antwort" OR "Automatic reply" OR "AutoReply" OR "Out of Office" OR "Xesc Duran" OR "Abwesend" OR "Absence" OR "Absence du bureau" OR "À l'extérieur du bureau" OR "Réponse automatique" OR "Abwesenheitsnotiz" OR "Resposta automática" OR "Automaattinen vastaus" OR "Automatisch antwoord" OR "Afwezig" OR "Afwezigheid" OR "Niet aanwezig" OR "Poza zasięgiem" OR "Na wakacjach" OR "Poza biurem" OR "Automatyczna odpowiedź" OR "Z dala od komputera" OR "Αυτόματη απάντηση" OR "Εκτός γραφείου" OR "na dovolenké" OR "mimo kancelárie" OR "automatická odpověď" OR "Autosvar" OR "Fora do escritório" OR "na dovolené" OR "mimo kancelář")
## List
Automatische Antwort
Automatic reply
View hug.txt
___ ____ ___
____( \ .-' `-. / )____
(____ \_____ / (O O) \ _____/ ____)
(____ `-----( ) )-----' ____)
(____ _____________\ .____. /_____________ ____)
(______/ `-.____.-' \______)
View shippo-transaction.json
{
"object_state": "VALID",
"object_status": "SUCCESS",
"object_created": "2013-12-27T19:14:48.273Z",
"object_updated": "2013-12-27T19:14:48.273Z",
"object_id": "64bba01845ef40d29374032599f22588",
"object_owner": "shippotle@goshippo.com",
"was_test": false,
"rate": "cf6fea899f1848b494d9568e8266e076",
"tracking_number": "ZW70QJC",
View laravel-slug.php
<?php
namespace App\Services;
use App\Post;
class Slug
{
/**
* @param $title
View test.blade.php
{{ \Carbon\Carbon::setLocale('fr') }}
{{ $link->published_at->diffForHumans() }}
// Results
il y a 4 heures
Or another:
{{ \Carbon\Carbon::setLocale('de') }}
{{ $link->published_at->diffForHumans() }}
@ericlbarnes
ericlbarnes / Implementation.php
Last active Sep 27, 2015
Example code for pulling the top posts from WordPress API
View Implementation.php
<?php $popular = (new WordPressApi())->popular(); ?>
<ul>
<?php foreach ($popular as $post): ?>
<li><a href=<?php echo $post->href; ?>><?php echo $post->title; ?></li>
<?php endforeach; ?>
</ul>
@ericlbarnes
ericlbarnes / HelpSpotRequestUpdate.php
Created Jul 31, 2015
Example HelpSpot Curl Request with Attachment
View HelpSpotRequestUpdate.php
<?php
$url = 'http://helpspot.dev/api/index.php?method=private.request.update';
$user = 'you@email.com';
$pass = 'password';
$file = 'TestFile_Source.xlsx'; // In this example the source file is in the same directory as this script.
function getMime($filename) {
$finfo = new finfo(FILEINFO_MIME_TYPE);
if (is_object($finfo)) {
// application/vnd.openxmlformats-officedocument.spreadsheetml.sheet is for .xlsx
@ericlbarnes
ericlbarnes / app.js
Created Jul 22, 2015
Example delete request
View app.js
$(document).ready(function() {
$("button.remove").on('click', function(e){
e.preventDefault();
if ( ! confirm('Are you sure?')) {
return false;
}
var action = $(this).data("action");
var parent = $(this).parent();
$.ajax({
type: 'delete',
You can’t perform that action at this time.