Skip to content

Instantly share code, notes, and snippets.

Yazeed Al Oyoun yazeed

Block or report user

Report or block yazeed

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
@Bodom78
Bodom78 / laravel-mongodb-sentinel
Last active Jan 1, 2018
Use the Sentinel 2.x authentication package with Laravel 5.1 and MongoDB
View laravel-mongodb-sentinel
Work in Progress: More testing to be done.
At a glance Authentication, Activation, Throttle, Groups & Permissions seem to
be working.
Downside: Copy and modify files.
Upside: Not really much work to get it up and running.
Assumes you have Laravel 5.1, jenssegers/laravel-mongodb + session addon set up
and your app is namespaced to App/
@bayareawebpro
bayareawebpro / deployer.php
Created May 28, 2018
Laravel Deployer Config
View deployer.php
<?php
return [
/*
|--------------------------------------------------------------------------
| Default deployment strategy
|--------------------------------------------------------------------------
|
| This option defines which deployment strategy to use by default on all
@msurguy
msurguy / eloquent.md
Last active Feb 13, 2019
Laravel 4 Eloquent Cheat Sheet.
View eloquent.md

Conventions:

Defining Eloquent model (will assume that DB table named is set as plural of class name and primary key named "id"):

class Shop extends Eloquent {}

Using custom table name

protected $table = 'my_shops';

View install oh my zsh in homestead
sudo apt-get install zsh -y
git clone git://github.com/robbyrussell/oh-my-zsh.git /home/vagrant/.oh-my-zsh
cp /home/vagrant/.oh-my-zsh/templates/zshrc.zsh-template /home/vagrant/.zshrc
sudo chsh -s /usr/bin/zsh vagrant
sed -i 's/robbyrussell/agnoster/g' /home/vagrant/.zshrc
@Kuki145
Kuki145 / migrate.sh
Last active Dec 27, 2019
Steps to update a Mariner node to Freedom-Gemini node
View migrate.sh
# ================================================================================================
# IMPORTANT NOTE
# These commands should only be used to migrate your ot-node from version 2.0.59 to version 4.0.0
# They could cause problems if your node has already been running on version 4.0.0 for some time
# ================================================================================================
mkdir ~/Node_2_0_59_backup/
docker cp otnode:/ot-node/data/kademlia.crt ~/Node_2_0_59_backup/
docker cp otnode:/ot-node/data/kademlia.key ~/Node_2_0_59_backup/
@jonathanmoore
jonathanmoore / gist:2640302
Created May 8, 2012
Get the share counts from various APIs
View gist:2640302

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.

Twitter

@NikolayIT
NikolayIT / LinearRegression.cs
Created Mar 17, 2017
Linear regression implementation in pure C# with example of Bulgarian population prediction
View LinearRegression.cs
namespace LinearRegression
{
using System;
using System.Diagnostics;
public static class Program
{
public static void Main()
{
var xValues = new double[]
@anchetaWern
anchetaWern / laravel-ums.markdown
Created Dec 6, 2012
Building a User Management System in Laravel
View laravel-ums.markdown

There's no shortage of good resources for learning laravel. So instead of the usual introductory tutorial were just gonna learn Laravel by building a project from scratch and that's gonna be a User Management System.

I don't know if my definition of a User Management System is correct but here's my idea of what's it's capable of doing:

  • Register Roles
  • Register Users
  • Update Users
@mnshankar
mnshankar / macros
Last active Feb 26, 2020
Laravel 4 (Twitter Bootstrap 3.0 compliant) form macros that I commonly use
View macros
<?php
/*********************************************************************************************
* Example usage (In view)
* <div class="welcome">
<?php echo Form::open(array('route'=>'process','class'=>'form-horizontal'))?>
<?php echo Form::textField('first_name')?>
<?php echo Form::textField('last_name')?>
<?php echo Form::emailField('email')?>
<?php echo Form::passwordField('password')?>
<?php echo Form::selectField('select_one', array('1'=>'abc', '2'=>'def'))?>
@tranzium
tranzium / autoview-syntax.txt
Last active Mar 4, 2020
TradingView can now become automated trading.
View autoview-syntax.txt
---------- Usage
The syntax created by these parameters is placed in an alert's description on TradingView
to be utilized by Autoview, a Chrome Extension.
Autoview: https://chrome.google.com/webstore/detail/autoview/okdhadoplaoehmeldlpakhpekjcpljmb
> Website: https://autoview.with.pink
> Help: https://use.autoview.with.pink
> Discord: https://discordapp.com/invite/BFz8VPn
TradingView: https://tradingview.go2cloud.org/aff_c?offer_id=2&aff_id=1187
You can’t perform that action at this time.