Skip to content

Instantly share code, notes, and snippets.

View yazeed's full-sized avatar

Yazeed Al Oyoun yazeed

View GitHub Profile
@jonathanmoore
jonathanmoore / gist:2640302
Created May 8, 2012 23:17
Get the share counts from various APIs

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

@brandonb927
brandonb927 / osx-for-hackers.sh
Last active March 27, 2024 06:33
OSX for Hackers: Yosemite/El Capitan Edition. This script tries not to be *too* opinionated and any major changes to your system require a prompt. You've been warned.
#!/bin/sh
###
# SOME COMMANDS WILL NOT WORK ON macOS (Sierra or newer)
# For Sierra or newer, see https://github.com/mathiasbynens/dotfiles/blob/master/.macos
###
# Alot of these configs have been taken from the various places
# on the web, most from here
# https://github.com/mathiasbynens/dotfiles/blob/5b3c8418ed42d93af2e647dc9d122f25cc034871/.osx
@anchetaWern
anchetaWern / laravel-ums.markdown
Created December 6, 2012 11:14
Building a User Management System in Laravel

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
@msurguy
msurguy / eloquent.md
Last active February 8, 2022 03:13
Laravel 4 Eloquent Cheat Sheet.

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';

@mnshankar
mnshankar / macros
Last active March 17, 2021 19:51
Laravel 4 (Twitter Bootstrap 3.0 compliant) form macros that I commonly use
<?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'))?>
@denji
denji / http-benchmark.md
Last active March 28, 2024 07:52
HTTP(S) Benchmark Tools / Toolkit for testing/debugging HTTP(S) and restAPI (RESTful)
@Chaser324
Chaser324 / GitHub-Forking.md
Last active March 25, 2024 09:48
GitHub Standard Fork & Pull Request Workflow

Whether you're trying to give back to the open source community or collaborating on your own projects, knowing how to properly fork and generate pull requests is essential. Unfortunately, it's quite easy to make mistakes or not know what you should do when you're initially learning the process. I know that I certainly had considerable initial trouble with it, and I found a lot of the information on GitHub and around the internet to be rather piecemeal and incomplete - part of the process described here, another there, common hangups in a different place, and so on.

In an attempt to coallate this information for myself and others, this short tutorial is what I've found to be fairly standard procedure for creating a fork, doing your work, issuing a pull request, and merging that pull request back into the original project.

Creating a Fork

Just head over to the GitHub page and click the "Fork" button. It's just that simple. Once you've done that, you can use your favorite git client to clone your repo or j

@Bodom78
Bodom78 / laravel-mongodb-sentinel
Last active January 1, 2018 11:25
Use the Sentinel 2.x authentication package with Laravel 5.1 and MongoDB
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/
@tranzium
tranzium / autoview-syntax.txt
Last active November 13, 2023 19:33
TradingView can now become automated trading.
---------- 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
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