Skip to content

Instantly share code, notes, and snippets.

View fahdi's full-sized avatar

Fahad Murtaza fahdi

View GitHub Profile
<!-- 1. Take your Campaign Monitor subscribe form as generated from within your account: -->
<form action="http://myaccount.createsend.com/t/r/s/aljhk/" method="post" id="subForm">
<div>
<label for="name">Name:</label><br /><input type="text" name="cm-name" id="name" /><br />
<label for="aljhk-aljhk">Email:</label><br /><input type="text" name="cm-aljhk-aljhk" id="aljhk-aljhk" /><br />
<input type="submit" value="Subscribe" />
</div>
</form>
@fahdi
fahdi / home.php
Created November 30, 2013 22:29 — forked from slambert/home.php
<?php get_header() ?>
<!-- generated with home.php -->
<div id="home-banner">
<?php putRevSlider("tsleadin") ?>
</div><!-- #home-banner-->
<div id="home-container">
@fahdi
fahdi / code.php
Created December 31, 2013 04:44 — forked from anonymous/code.php
<?php
add_action( 'user_profile_update_errors', 'validate_field' );
function validate_field(&$errors, $update = null, &$user = null)
{
if($user->has_cap('s2member_level2')) { // Custom fields only display to business accounts
// Nested if to check for field(s)
if ($_POST['exp_years']=='' or $_POST['exp_years']==NULL) // Change to check for empty or any regular expression.
<?php
add_action('nav_menu_css_class', 'add_current_nav_class', 10, 2 );
function add_current_nav_class($classes, $item) {
// Getting the current post details
global $post;
// Getting the post type of the current post

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
@fahdi
fahdi / eq_vs_at_vs_amp.html
Created September 26, 2016 07:24 — forked from RobertAKARobin/eq_vs_at_vs_amp.html
Angular Directives: `=` vs `@` vs `&`
<!DOCTYPE html>
<html>
<head>
<title>Angular</title>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.3.15/angular.min.js"></script>
</head>
<body ng-app="myApp">
<div ng-controller="myCtrl as VM">
<a my-dir
attr1="VM.sayHi('Juan')"
@fahdi
fahdi / index.html
Created September 29, 2016 15:12 — forked from anonymous/index.html
Welcome to JS Bin // source http://jsbin.com/hidehuk
<script src="https://cdn.rawgit.com/zloirock/core-js/master/client/shim.min.js"></script>
<script src="https://cdn.jsdelivr.net/lodash/4/lodash.min.js"></script>
<!DOCTYPE html>
<html>
<head>
<script src="http://jashkenas.github.com/coffee-script/extras/coffee-script.js"></script>
<meta charset=utf-8 />
<title>Welcome to JS Bin</title>
<meta name="viewport" content="width=device-width">
<link href='http://fonts.googleapis.com/css?family=Doppio+One' rel='stylesheet' type='text/css'>
@fahdi
fahdi / index.html
Created September 30, 2016 21:53 — forked from anonymous/index.html
JS Bin // source http://jsbin.com/fadawif
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>JS Bin</title>
</head>
<body>
<script src="https://cdn.jsdelivr.net/lodash/4/lodash.min.js"></script>
@fahdi
fahdi / jira-code-acceptance.js
Created October 23, 2016 00:43 — forked from mtheoryx/jira-code-acceptance.js
Conversion of a user story into protractor/jasmine stubbed tests
"use strict";
/*
* Login page and fields
* */
xdescribe('Application login page > ', function () {
beforeEach(function() {
//start at root app url every time tests are run
browser.get('http://localhost:8888/#/login');
});
xit('should be accessible', function () {
@fahdi
fahdi / gh-pages-deploy.md
Created July 24, 2017 18:43 — forked from cobyism/gh-pages-deploy.md
Deploy to `gh-pages` from a `dist` folder on the master branch. Useful for use with [yeoman](http://yeoman.io).

Deploying a subfolder to GitHub Pages

Sometimes you want to have a subdirectory on the master branch be the root directory of a repository’s gh-pages branch. This is useful for things like sites developed with Yeoman, or if you have a Jekyll site contained in the master branch alongside the rest of your code.

For the sake of this example, let’s pretend the subfolder containing your site is named dist.

Step 1

Remove the dist directory from the project’s .gitignore file (it’s ignored by default by Yeoman).