Skip to content

Instantly share code, notes, and snippets.

View ayarse's full-sized avatar

ayaz ayarse

View GitHub Profile
@phillipsharring
phillipsharring / Kernel.php
Last active October 9, 2023 13:11 — forked from kkiernan/MySqlDump.php
Laravel Artisan command to perform MySQL Dump using database connection information in the .env file. Posted 2016 Jan. Unsupported. Forked from https://gist.github.com/kkiernan/bdd0954d0149b89c372a
<?php
namespace App\Console;
use Illuminate\Console\Scheduling\Schedule;
use Illuminate\Foundation\Console\Kernel as ConsoleKernel;
class Kernel extends ConsoleKernel
{
/**
@lucadegasperi
lucadegasperi / Vagrantfile
Created September 28, 2014 20:10
Homestead Plus
VAGRANTFILE_API_VERSION = "2"
path = "#{File.dirname(__FILE__)}"
require 'yaml'
require path + '/scripts/homestead.rb'
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
Homestead.configure(config, YAML::load(File.read(path + '/Homestead.yaml')), Vagrant.has_plugin?('vagrant-hostsupdater'))
end
@tvanantwerp
tvanantwerp / custom-social-media-buttons.md
Last active September 20, 2022 10:54
Custom Social Media Sharing Buttons

Custom Sharing Buttons for Social Media

These files contain a basic template for creating customized social media share buttons on a web page. The CSS styles are arbitrary, and easily changes. The HTML and JavaScript works as follows.

HTML Structure

The buttons are simply a elements with no href value. Font Awesome is used to add icons. The IDs are used by the JavaScript to modify these a elements.

JavaScript Structure

This file uses jQuery.

Three functions are defined to find share counts for Facebook, Twitter and LinkedIn. Google+ is currently excluded.

The web page address is grabbed by window.location.href and encoded. The page title is pulled from whatever HTML element has id="title". The share count functions are called, and the results appended to the inner text of the share buttons. The the href of each button is changed to the appropriate URL for sharing the webpage.

@vool
vool / laravel_post_receive hook
Last active May 5, 2022 22:39
Post receive hook for Laravel website deploy
#!/bin/bash
echo "********************"
echo "Post receive hook: Updating website"
echo "********************"
#set the git repo dir
GIT_REPO_DIR=~/git/<repo>.git
echo "The git repo dir is $GIT_REPO_DIR"
@magnetikonline
magnetikonline / README.md
Last active September 30, 2020 13:00
Minimum Open Graph tags required for a webpage - for use with Facebook.

Open Graph tags for page <head>.

<meta property="og:title" content="title" />
<meta property="og:description" content="desc" />
<meta property="og:type" content="website" />
<meta property="og:url" content="http://url.com/" />
<meta property="og:image" content="http://url.com/image.jpg" />