Skip to content

Instantly share code, notes, and snippets.

Building a International Wallet with Laravel, VueJS, React-Native.

Shyam Sunder Verma ssv445

Building a International Wallet with Laravel, VueJS, React-Native.
View GitHub Profile
ssv445 / .htaccess
Last active Aug 6, 2020
Laravel Apache hide .env and several security settings via .htaccess
View .htaccess
# Disable Directory listing
Options -Indexes
# block files which needs to be hidden // in here specify .example extension of the file
<Files ~ "\.(env|json|config.js|md|gitignore|gitattributes|lock)$">
Order allow,deny
Deny from all
# in here specify full file name sperator '|'
View Session.php
namespace App\Sk\Session;
use App\Sk\SkApi;
use Carbon\Carbon;
use App\Sk\SkModel;
use App\Sk\SkPayload;
use App\Sk\User\User;
ssv445 / gist:dfeda39756cf7bfe3f38550c50673dce
Created Jul 22, 2018 — forked from jonathanmoore/gist:2640302
Get the share counts from various APIs
View gist:dfeda39756cf7bfe3f38550c50673dce

Share Counts

I have always struggled with getting all the various share buttons from Facebook, Twitter, Google Plus, Pinterest, etc to align correctly and to not look like a tacky explosion of buttons. Seeing a number of sites rolling their own share buttons with counts, for example The Next Web I decided to look into the various APIs on how to simply return the share count.

If you want to roll up all of these into a single jQuery plugin check out Sharrre

Many of these API calls and methods are undocumented, so anticipate that they will change in the future. Also, if you are planning on rolling these out across a site I would recommend creating a simple endpoint that periodically caches results from all of the APIs so that you are not overloading the services will requests.


View cloudSettings
# Your init script
# Atom will evaluate this file each time a new window is opened. It is run
# after packages are loaded/activated and after the previous editor state
# has been restored.
# An example hack to log to the console when each text editor is saved.
# atom.workspace.observeTextEditors (editor) ->
# editor.onDidSave ->
ssv445 /
Created Nov 24, 2015 — forked from oodavid/
Backup MySQL to Amazon S3

Backup MySQL to Amazon S3

This is a simple way to backup your MySQL tables to Amazon S3 for a nightly backup - this is all to be done on your server :-)

Sister Document - Restore MySQL from Amazon S3 - read that next

1 - Install s3cmd

this is for Centos 5.6, see for other systems like ubuntu etc

ssv445 / index.js
Last active Sep 2, 2015 — forked from MoOx/index.js
Export/import github labels
View index.js
// go on you labels pages
// eg
// paste this script in your console
// copy the output and now you can import it using !
var labels = [];
.forEach(function(element) {
name: element.textContent.trim(),
ssv445 /
Created Jul 17, 2014
auto commit folder with changed file as commit message
# move to www folder
cd /var/www
rm -f commit.msg
# add files
git add .
# build commit message
ssv445 /
Created Apr 23, 2014
Setup file permission in Joomla CMS
[[ $pwd =~ ^/var/www* ]] || exit 0
echo 'PWD is subdirectory of /var/www, applying permissions ...'
find . -exec chown www-data:www-data {} \;
find . -type f -exec chmod 644 {} \;
find . -type d -exec chmod 755 {} \;
ssv445 / update-joomla-config.php
Last active Dec 27, 2015
PHP CLI script to update Joomla configuration file
View update-joomla-config.php
$joomlaroot = isset($argv[1]) ? $argv[1] : die("First argument required and it should be absolute-joomla-root-path");
$args = array();
while($i <= $argc){