Skip to content

Instantly share code, notes, and snippets.

imliam / pagination.blade.php
Last active Nov 26, 2018
Laravel 5 - Bootstrap 4 Pagination
View pagination.blade.php
| Laravel 5, Bootstrap 4 Pagination
| A partial view to handle pagination for collections in Laravel's query
| builder or Eloquent ORM, styled with Bootstrap 4.
| The pagination displays like the following, where * denotes the current
andreibosco /
Last active Jun 14, 2021
disable creative cloud startup on mac
cecilemuller /
Last active Jun 16, 2021
How to setup Let's Encrypt for Nginx on Ubuntu 18.04 (including IPv6, HTTP/2 and A+ SSL rating)

How to setup Let's Encrypt for Nginx on Ubuntu 18.04 (including IPv6, HTTP/2 and A+ SLL rating)

Virtual hosts

Let's say you want to host domains and

Create folders for their files:

ralph089 / .wakeup
Last active Jan 14, 2020
Restarts Bluetooth Module on Mac OS X. You can use the script as shortcut to restart Bluetooth on demand or you can use it with "SleepWatcher" to automatically restart Bluetooth on wakeup (See I created it, because my Logitech Bluetooth Mouse doesn't stay connected after sleep-mode, so i had to manually re-pair my mouse.
View .wakeup
# Restart Bluetooth Module on Mac OS X
# Requires Blueutil to be installed:
log() {
echo "$@"
ayamomiji / deploy.rb
Last active Oct 31, 2020
capistrano 3: precompile assets on local machine then upload
View deploy.rb
namespace :deploy do
namespace :assets do
desc "Precompile assets on local machine and upload them to the server."
task :precompile do
run_locally do
execute 'RAILS_ENV=production bundle exec rake assets:precompile'
zaherg /
Last active Oct 18, 2020
a small tips to install latest nginx , php 5.5 & laravel 4.1 since that Laravel 4.1 has been released, i have removed the line which explain how to install laravel from dev branch using composer.

Creating Your Laravel & nginx Server

We will install Larave 4.1 with PHP5.5 & Latest nginx on Ubuntu 12.04.3 x64.

updating your system

apt-get update && apt-get upgrade
adduser [username]
usermod -aG sudo [username]
apt-get -y install git
markbates / gist:4240848
Created Dec 8, 2012
Getting Started with Rack
View gist:4240848

If you're writing web applications with Ruby there comes a time when you might need something a lot simpler, or even faster, than Ruby on Rails or the Sinatra micro-framework. Enter Rack.

Rack describes itself as follows:

Rack provides a minimal interface between webservers supporting Ruby and Ruby frameworks.

Before Rack came along Ruby web frameworks all implemented their own interfaces, which made it incredibly difficult to write web servers for them, or to share code between two different frameworks. Now almost all Ruby web frameworks implement Rack, including Rails and Sinatra, meaning that these applications can now behave in a similar fashion to one another.

At it's core Rack provides a great set of tools to allow you to build the most simple web application or interface you can. Rack applications can be written in a single line of code. But we're getting ahead of ourselves a bit.

sgmurphy / url_slug.js
Created Jul 12, 2012
URL Slugs in Javascript (with UTF-8 and Transliteration Support)
View url_slug.js
* Create a web friendly URL slug from a string.
* Requires XRegExp ( with unicode add-ons for UTF-8 support.
* Although supported, transliteration is discouraged because
* 1) most web browsers support UTF-8 characters in URLs
* 2) transliteration causes a loss of information
* @author Sean Murphy <>
Vinai / CartController.php
Created Jul 11, 2012
Your/Ext/etc/config.xml and Your/Ext/controllers/Checkout/CartController.php
View CartController.php
// Your/Ext/controllers/Checkout/CartController.php
class Your_Ext_Checkout_CartController extends Mage_Checkout_CartController
public function yourNewAction()