Skip to content

Instantly share code, notes, and snippets.

snipe snipe

Block or report user

Report or block snipe

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
snipe / gist:936bf578fea346e0c16845a7146d7f59
Last active Mar 23, 2018
Snipe-IT tinker cached .env recover for wiped file
View gist:936bf578fea346e0c16845a7146d7f59
# --------------------------------------------
# --------------------------------------------
View Send Laravel Cashier invoices as an attachment
namespace App\Notifications;
use Illuminate\Bus\Queueable;
use Illuminate\Notifications\Notification;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Notifications\Messages\MailMessage;
use PDF;
View Freshsales API using Guzzle
$info = [
'deal' => [
'name' => 'Plan Name',
'amount' => 100,
'stage_name' => 'won',
'closed_date' => '2017-06-02',
'deal_stage_id' => 'DEAL-STAGE-ID',
'sales_account' => [
'name' => 'Account Name',
'website' => ''
View Laravel unique for all undeleted
* Use Case:
* You have multiple deleted_at items that share an attribute that is supposed to be unique,
* for example, a username in a user's table, and are using model-level validation and watson/validation
* In this use case, you want to ignore ALL deleted items when considering uniqueness.
* The current `unique` validation rule doesn't seem to do this, even when you add the extra
* columns and ignored fields, e.g.:
snipe / harryPotterAliases
Created Jun 13, 2016 — forked from graceavery/harryPotterAliases
bash aliases for Harry Potter enthusiasts
View harryPotterAliases
alias accio=wget
alias avadaKedavra='rm -f'
alias imperio=sudo
alias priorIncantato='echo `history |tail -n2 |head -n1` | sed "s/[0-9]* //"'
alias stupefy='sleep 5'
alias wingardiumLeviosa=mv
alias sonorus='set -v'
alias quietus='set +v'
snipe / AppServiceProvider.php
Last active Feb 13, 2020
Validate email array in Laravel 5.2 wth custom validator
View AppServiceProvider.php
* This service provider handles a few custom validation rules.
* PHP version 5.5.9
* @package Snipe-IT
* @version v3.0
namespace App\Providers;
snipe / DbmigrateController.php
Created Feb 13, 2016 — forked from oilop9000/DbmigrateController.php
Laravel 4 Convert existing MySQL database to migrations. This is a fork of Lee Zhen Yong fork from Christopher Pitt's work, which is based off michaeljcalkins's work at
View DbmigrateController.php
/* * **
* This script converts an existing MySQL database to migrations in Laravel 4.
* 1. Place this file inside app/controllers/
* 2. In this file, edit the index() method to customize this script to your needs.
* - inside $migrate->ignore(), you pass in an array of table
snipe / currency_symbols.php
Created Nov 4, 2015 — forked from Gibbs/currency_symbols.php
An array of currency symbols as HTML entities
View currency_symbols.php
$currency_symbols = array(
'AED' => '&#1583;.&#1573;', // ?
'AFN' => '&#65;&#102;',
'ALL' => '&#76;&#101;&#107;',
'AMD' => '',
'ANG' => '&#402;',
'AOA' => '&#75;&#122;', // ?
'ARS' => '&#36;',
'AUD' => '&#36;',
snipe / currency_list
Created Nov 4, 2015 — forked from MindaugasR/currency_list
World Currency list in PHP Array
View currency_list
array (
'ALL' => 'Albania Lek',
'AFN' => 'Afghanistan Afghani',
'ARS' => 'Argentina Peso',
'AWG' => 'Aruba Guilder',
'AUD' => 'Australia Dollar',
'AZN' => 'Azerbaijan New Manat',
'BSD' => 'Bahamas Dollar',
'BBD' => 'Barbados Dollar',
'BDT' => 'Bangladeshi taka',
snipe / gist:741e6c1df72db7059ddc
Last active Aug 27, 2015 — forked from jkeck/gist:3515705
Link directly to an open modal window in Bootstrap
View gist:741e6c1df72db7059ddc
/* If you've ever had the need to link directly to an open modal window with Bootstrap, here's a quick and easy way to do it:
Make sure your modal has an id and is classed with modal and permalink:
<div class="modal permalink" id="myModal" ... >
Then stick this bit of Javascript at at the end of your document:
$(document).ready(function() {
You can’t perform that action at this time.