Skip to content

Instantly share code, notes, and snippets.

@CodeMyUI
CodeMyUI / index.html
Created July 21, 2015 09:55
Material Design Register Login Form
<div class="materialContainer">
<div class="box">
<div class="title">LOGIN</div>
<div class="input">
<label for="name">Username</label>
<input type="text" name="name" id="name">
@mandiwise
mandiwise / Update remote repo
Last active April 17, 2024 07:41
Transfer repo from Bitbucket to Github
// Reference: http://www.blackdogfoundry.com/blog/moving-repository-from-bitbucket-to-github/
// See also: http://www.paulund.co.uk/change-url-of-git-repository
$ cd $HOME/Code/repo-directory
$ git remote rename origin bitbucket
$ git remote add origin https://github.com/mandiwise/awesome-new-repo.git
$ git push origin master
$ git remote rm bitbucket
@flackend
flackend / Redirect After Session Expires.md
Last active October 20, 2018 12:44
Example solution to handling re-authentication after session expires for AJAX requests.

When a user's session expires and they're on a page that uses ajax requests, you need to set up something to gracefully handle reauthenticating. In this example, we prompt the user and redirect them to the login page.

demo

For Laravel, in your auth filter:

<?php
Route::filter('auth', function()
{
@BFTrick
BFTrick / woocommerce-check-terms.php
Last active February 12, 2024 12:02
Make the WooCommerce Terms & Conditions checkbox checked by default
<?php
/**
* Plugin Name: WooCommerce Check Terms & Conditions
* Plugin URI: https://gist.github.com/BFTrick/7789974
* Description: Make the Terms & Conditions checkbox checked by default
* Author: Patrick Rauland
* Author URI: http://patrickrauland.com/
* Version: 1.0
*
* This program is free software: you can redistribute it and/or modify