Skip to content

Instantly share code, notes, and snippets.

View LaminSanneh's full-sized avatar

Lamin Sanneh LaminSanneh

View GitHub Profile
@LaminSanneh
LaminSanneh / Html5 : starter-index
Created July 10, 2013 09:21
Html5 : starter index
<!DOCTYPE html>
<!--[if lt IE 7]> <html class="no-js lt-ie9 lt-ie8 lt-ie7"> <![endif]-->
<!--[if IE 7]> <html class="no-js lt-ie9 lt-ie8"> <![endif]-->
<!--[if IE 8]> <html class="no-js lt-ie9"> <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js"> <!--<![endif]-->
<head>
<meta charset="UTF-8">
<title></title>
<meta http-equiv="X-UA-Compatible" content="chrome=1">
<meta name="description" content="">
@LaminSanneh
LaminSanneh / Css: Simple Minimal Reset
Created July 10, 2013 09:36
Css: Simple Minimal Reset
html, body, div, h1, h2, h3, h4, h5, h6, ul, ol, dl, li, dt, dd, p, blockquote,
pre, form, fieldset, table, th, td
{
margin: 0;
padding: 0;
border: 0;
box-sizing: border-box;
}
@LaminSanneh
LaminSanneh / Wordpress : Loop WpQuery
Created July 23, 2013 08:49
Wordpress : Loop WpQuery
<?php
$first_query = new WP_Query('cat=7&showposts=3');
while($first_query->have_posts()) : $first_query->the_post();
the_excerpt();
endwhile;
//Add next and previous links after query
next_posts_link('&laquo; Older Entries');
previous_posts_link('Newer Entries &raquo;');
@LaminSanneh
LaminSanneh / Wordpress : Loop Generic
Created July 23, 2013 08:51
Wordpress : Loop Generic
<?php // The WordPress Loop
if (have_posts()) : while (have_posts()) : the_post();
...
endwhile; else:
..
endif; ?>
@LaminSanneh
LaminSanneh / Wordpress : Loop Modify Generic
Created July 23, 2013 08:51
Wordpress : Loop Modify Generic
<?php // The WordPress Loop - customized with query_posts
query_posts('cat=-9'); // exclude Asides category (tag_ID = 9)
if (have_posts()) : while (have_posts()) : the_post();
...
endwhile; else:
...
endif;
?>
@LaminSanneh
LaminSanneh / Useful Command Line Commands
Created July 24, 2013 07:47
Useful Command Line Commands
//***************** Useful Command Line Commands ***********//
MAC PC
Ctrl(Control) + a -------- Move to the beggining of the current command
Ctrl(Control) + e -------- Move to the end of the current command
echo ~ -------- print out our home directory
clear -------- cleans out your terminal of all previous commands
@LaminSanneh
LaminSanneh / Ruby on Rails : Useful Commands
Created July 24, 2013 13:16
Ruby on Rails : Useful Commands
Ruby on Rails Useful Commands
//Make sure you have ruby installed to be able to run these commands
gem install rails -------- This installs rails for you
gem install rails-api -------- This installs rails api gem for creating a restful api oriented app
rails new appName -------- Creates a new rails application in the
folder with the same name as the app
@LaminSanneh
LaminSanneh / Css3 transition rotate snippet
Created October 17, 2013 20:48
Css3 transition rotate snippet
/*Note that this is not regular css, we are using scss*/
.logo-image{
/*Put easing and time duration here*/
-webkit-transition: all 0.5s ease-in-out;
-moz-transition: all 0.5s ease-in-out;
-o-transition: all 0.5s ease-in-out;
-ms-transition: all 0.5s ease-in-out;
&:hover{
@LaminSanneh
LaminSanneh / 0_reuse_code.js
Created November 9, 2013 18:17
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@LaminSanneh
LaminSanneh / Laravel redirect to shortcuts
Created November 9, 2013 18:23
Laravel redirect to shortcuts
Redirect::route('route_name', options) //redirects you to a named route with options as an array