Skip to content

Instantly share code, notes, and snippets.

View bugyt's full-sized avatar

Laurent H. bugyt

View GitHub Profile
@bugyt
bugyt / off-canvas.html
Created April 4, 2016 14:36
Pattern - Off Canvas
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title></title>
<link rel="stylesheet" type="text/css" href="../../default-styles.css">
<style type="text/css">
@bugyt
bugyt / pattern-mostly-fluid.html
Created April 4, 2016 14:14
Pattern Mostly Fluid
<!DOCTYPE html>
<html lang="en">
<head>
<title>Mostly Fluid - Quiz</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<style type="text/css">
/*
These are the default styles. No need to change these.
*/
@bugyt
bugyt / responsive.md
Last active April 5, 2016 09:11
Responsive Web Design Fundamentals

dpi = hardware dpi / dpi ratio

exemple : hardware = 1920, ratio 2, DPI = 1920 / 2 = 960

   img, object, embed, canvas, video, audio, picture {
          max-width: 100%;
   height: auto;
          _width: 100%; /* IE6 seulement */

}

Dot notation is faster to write and clearer to read. Square bracket notation allows access to properties containing special characters and selection of properties using variables.

@bugyt
bugyt / cowtune.sh
Created February 29, 2016 18:40
Cowsay with fortune
if [ -x /usr/bin/cowsay -a -x /usr/bin/fortune ]; then
fortune | cowsay -n -f tux
fi
@bugyt
bugyt / BasicAlgorithmScripting.js
Last active March 2, 2016 19:20
JS: Basic Algorithm Scripting
////////////////////////////////////////////////////////////////
// Reverse a String
////////////////////////////////////////////////////////////////
function reverseString(str) {
var myArray = str.split('');
myArray.reverse();
str = myArray.join('');
return str;
@bugyt
bugyt / git_bash_profile.sh
Created February 14, 2016 19:36
Git bash_profile configuration
# Enable tab completion
source ~/git-completion.bash
# colors!
green="\[\033[0;32m\]"
blue="\[\033[0;34m\]"
purple="\[\033[0;35m\]"
reset="\[\033[0m\]"
# Change command prompt
@bugyt
bugyt / git-completion.bash
Created February 14, 2016 19:34
Git completion
# bash/zsh completion support for core Git.
#
# Copyright (C) 2006,2007 Shawn O. Pearce <spearce@spearce.org>
# Conceptually based on gitcompletion (http://gitweb.hawaga.org.uk/).
# Distributed under the GNU General Public License, version 2.0.
#
# The contained completion routines provide support for completing:
#
# *) local and remote branch names
# *) local and remote tag names
@bugyt
bugyt / git-prompt.sh
Created February 14, 2016 19:34
Script that allows you to see Git repository status in your prompt.
# bash/zsh git prompt support
#
# Copyright (C) 2006,2007 Shawn O. Pearce <spearce@spearce.org>
# Distributed under the GNU General Public License, version 2.0.
#
# This script allows you to see repository status in your prompt.
#
# To enable:
#
# 1) Copy this file to somewhere (e.g. ~/.git-prompt.sh).
@bugyt
bugyt / LinuxCommands.md
Last active February 13, 2016 13:33
Linux Commands
history

history -c

wc file.txt

diff file1.txt file2.txt

cowsay