Skip to content

Instantly share code, notes, and snippets.

View bugyt's full-sized avatar

Laurent H. bugyt

View GitHub Profile
@bugyt
bugyt / el_capitan.html
Created February 12, 2016 18:41
Run Vanilla OS X El Capitan, Yosemite or Mavericks in VirtualBox 5.0.10 on a Windows Host
<html>
<body>
<div class="post_body">
<div itemprop="commentText" class="post entry-content ">
<!--cached-Fri, 12 Feb 2016 11:58:52 +0000--><p><u><span style="font-family:arial, helvetica, sans-serif"><strong><span style="font-size:18px">Run Vanilla OS X El Capitan, Yosemite or Mavericks in VirtualBox 5.0.10 on a Windows Host</span></strong></span></u></p>
<p><span style="font-family:arial, helvetica, sans-serif"><span style="font-size:11pt">Following on from my <a href="http://www.insanelymac.com/forum/topic/309556-run-vanilla-os-x-el-capitan-in-vmware-workstation-12-on-a-windows-host/" class="bbc_url" title="">previous guide</a> on how to create a VMware virtual machine running Vanilla OS X El Capitan in Windows, I’ve decided to write a similar guide for creating a VirtualBox El Capitan VM.&nbsp; </span></span></p>
<p>&nbsp;</p>
@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
@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 <[email protected]>
# 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 / 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 <[email protected]>
# 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_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 / 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 / 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

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 / 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 */

}

@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.
*/