Skip to content

Instantly share code, notes, and snippets.

@mosleymos
mosleymos / index.html
Created October 15, 2014 14:12
Page html de base
<!DOCTYPE html PUBLIC "->
<html lang="fr">
<head>
<meta charset="utf8">
</head>
<body>
</body>
</html>
@mosleymos
mosleymos / base.cpp
Created October 15, 2014 14:17
Fichier simple de cpp
/*
* AUTHOR:
* NAME:
* DESCRIPTION:
* LICENCE
*/
#include <iostream>
@mosleymos
mosleymos / -Simple Bootstrap template
Last active August 29, 2015 14:08
Basic structure of a bootstrap row
<div class="container">
<div class="row">
<div class="col-md-12>
Texte a mettre
</div>
</div>
</div>
@mosleymos
mosleymos / -
Created November 6, 2014 13:47
Requete ajax modele
var ajaxOptions = {
url:'/find_my_location',
type: 'POST',
datatype:'json',
data:{latitude:lattitude, longitude:longitude},
success: function(data){
return console.log("it wrk")
}
,
@mosleymos
mosleymos / -
Created November 12, 2014 16:09
<div class="main-display-area">
<div class="col-md-2">
<div class="panel panel-default">
<div class="panel-heading">
<h3 class="panel-title">
Course Title
</h3>
</div>
<div class="panel-body">
<div class="list-group">
@mosleymos
mosleymos / Fizzbuzz
Created December 3, 2014 16:55
Fizzbuzz one-liner
def fizzbuzz(n)
# Return
return (1..n).map{|num| (num % 3 == 0 && num % 5 == 0 ? "FizzBuzz" :(num % 5 == 0 ? "Buzz" :(num % 3 == 0 ? "Fizz" : num) ) )
}end
@mosleymos
mosleymos / RSPEC devise
Created December 17, 2014 13:15
Rspec -devise testing code-simple
require "rails_helper"
# require "devise"
describe TasksController do
user = User.create(name:"Bob", password:"AZERTYUIOP",
password_confirmation:"AZERTYUIOP", email:"testeur@test.com")
it "require user to log in before to see index of tasks" do
get('index')
@mosleymos
mosleymos / Travail sur le tmux
Created December 19, 2014 10:53
TMUX conf pour revoir
# status bar
set-option -g status-utf8 on
# https://github.com/seebi/tmux-colors-solarized/blob/master/tmuxcolors-256.conf
set-option -g status-bg colour235 #base02
set-option -g status-fg colour136 #yellow
set-option -g status-attr default
# default window title colors
@mosleymos
mosleymos / vimrc
Created December 19, 2014 12:58
Vim Configuration
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" Maintainer:
" Amir Salihefendic
" http://amix.dk - amix@amix.dk
"
" Version:
" 5.0 - 29/05/12 15:43:36
"
function scrollToAnchor(aid){
var aTag = $("a[name='"+ aid +"']");
$('html,body').animate({scrollTop: aTag.offset().top},'slow');
}
$(".link").on('click', function() {
scrollToAnchor(this.id);
});