Skip to content

Instantly share code, notes, and snippets.

View dyaa's full-sized avatar

Dyaa dyaa

View GitHub Profile
@dyaa
dyaa / check.js
Created September 30, 2013 15:02
Check if jplayer is playing
$("#jquery_jplayer_1").jPlayer({
swfPath: "http://www.jplayer.org/latest/js/Jplayer.swf",
ready: function () {
$(this).jPlayer("setMedia", { mp3: "http://77.68.106.224:8018/;stream/1" });
},
supplied: "mp3"
});
setInterval(function () {
var isPaused = $('#jquery_jplayer_1').data().jPlayer.status.paused;
@dyaa
dyaa / index.html
Created October 1, 2013 15:11
Google Maps Styling
<div id="map"></div>
@dyaa
dyaa / popover.html
Created October 2, 2013 17:01
Place a form within popover in bootstrap 3
<a href="#" id="popover">the popover link</a>
<div id="popover-head" class="hide">some title</div>
<div id="popover-content" class="hide">
<form>
<!-- my form -->
</form>
</div>
@turquoise: #95A5A6;
@emerald: #2ECC71;
@peter-river: #3498DB;
@amethyst: #9B59B6;
@wet-asphalt: #34495E;
@green-sea: #16A085;
@nephritis: #27AE60;
@belize-hole: #2980B9;
@wisteria: #8E44AD;
@midnight-blue: #2C3E50;
@dyaa
dyaa / migrations.php
Created January 2, 2014 15:03
Convert an existing MySQL database to #laravel migrations. One time quick job might be helpful for someone
<?php
/*
@michaeljcalkins
// When run from a controller.
$migrate = SqlMigrations::ignore(['some_table'])
->convert('datebase')
->write();
**/
class SqlMigrations
{

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
@dyaa
dyaa / index.html
Created January 12, 2014 13:05
HTML5 Boilerplate Conditional Comments
<!--[if lt IE 7]><html lang="en" class="no-js ie6"><![endif]-->
<!--[if IE 7]><html lang="en" class="no-js ie7"><![endif]-->
<!--[if IE 8]><html lang="en" class="no-js ie8"><![endif]-->
<!--[if gt IE 8]><!--><html lang="en" class="no-js"><!--<![endif]-->
@dyaa
dyaa / index.js
Created January 12, 2014 22:54
Yeoman Two prompts depends on a question
Generator.prototype.askFor = function askFor() {
var cb = this.async();
var prompts = [{
type: 'checkbox',
name: 'features',
message: 'What more would you like to include?',
choices: [{
name: 'optionOne',
value: 'optionOne',
@dyaa
dyaa / css_resources.md
Created March 19, 2014 22:37 — forked from jookyboi/css_resources.md
CSS libraries and guides to bring some order to the chaos.

Libraries

  • 960 Grid System - An effort to streamline web development workflow by providing commonly used dimensions, based on a width of 960 pixels. There are two variants: 12 and 16 columns, which can be used separately or in tandem.
  • Compass - Open source CSS Authoring Framework.
  • Bootstrap - Sleek, intuitive, and powerful mobile first front-end framework for faster and easier web development.
  • Font Awesome - The iconic font designed for Bootstrap.
  • Zurb Foundation - Framework for writing responsive web sites.
  • SASS - CSS extension language which allows variables, mixins and rules nesting.
  • Skeleton - Boilerplate for responsive, mobile-friendly development.

Guides

@dyaa
dyaa / index.html
Last active August 29, 2015 13:57
Product Social Media Tag Template
<!-- Update your html tag to include the itemscope and itemtype attributes. -->
<html itemscope itemtype="http://schema.org/Product">
<!-- Place this data between the <head> tags of your website -->
<title>Page Title. Maximum length 60-70 characters</title>
<meta name="description" content="Page description. No longer than 155 characters." />
<!-- Schema.org markup for Google+ -->
<meta itemprop="name" content="The Name or Title Here">
<meta itemprop="description" content="This is the page description">