Skip to content

Instantly share code, notes, and snippets.

@sekouzed
sekouzed / index.html
Created March 12, 2017 21:55
Mac OS X Lion with CSS3
<head>
<title>Mac OS X Lion CSS3 by Alessio Atzeni</title>
<link rel="stylesheet" type="text/css" media="screen" href="http://www.alessioatzeni.com/mac-osx-lion-css3/res/css/style.css"/>
<script type="text/javascript" src="http://code.jquery.com/jquery-1.7.1.min.js"></script>
<script type="text/javascript" src="http://www.alessioatzeni.com/mac-osx-lion-css3/res/js/jquery-ui-1.8.17.custom.min.js"></script>
<script type="text/javascript" src="http://www.alessioatzeni.com/mac-osx-lion-css3/res/js/modernizr.js"></script>
<script type="text/javascript" src="http://www.alessioatzeni.com/mac-osx-lion-css3/res/js/fix-and-clock.js"></script>
<link rel="canonical" href="http://www.alessioatzeni.com/mac-osx-lion-css3/" />
@sekouzed
sekouzed / laravel.js
Created July 19, 2016 20:26 — forked from fer-ri/laravel.js
You use Laravel 5 and you want to send a DELETE request without creating a form? This will handle the form-creation bits for you dynamically, similar to the Rails implementation. To use, import script, and create a link with the `data-method="DELETE"` and `data-token="{{csrf_token()}}"` attributes.
/*
Taken from: https://gist.github.com/soufianeEL/3f8483f0f3dc9e3ec5d9
Modified by Ferri Sutanto
- use promise for verifyConfirm
Examples :
<a href="posts/2" data-method="delete" data-token="{{csrf_token()}}">
- Or, request confirmation in the process -
<a href="posts/2" data-method="delete" data-token="{{csrf_token()}}" data-confirm="Are you sure?">
@sekouzed
sekouzed / laravel.js
Created July 19, 2016 20:26 — forked from soufianeEL/laravel.js
You use Laravel 5 and you want to send a DELETE request without creating a form? This will handle the form-creation bits for you dynamically, similar to the Rails implementation. To use, import script, and create a link with the `data-method="DELETE"` and `data-token="{{csrf_token()}}"` attributes.
/*
Exemples :
<a href="posts/2" data-method="delete" data-token="{{csrf_token()}}">
- Or, request confirmation in the process -
<a href="posts/2" data-method="delete" data-token="{{csrf_token()}}" data-confirm="Are you sure?">
*/
(function() {
@sekouzed
sekouzed / Constellation.markdown
Last active March 28, 2018 01:48
Constellation
@sekouzed
sekouzed / itineraire_gmaps.js
Created April 21, 2016 16:34 — forked from AdrienVH/itineraire_gmaps.js
Utiliser Google Maps pour calculer un itinéraire entre deux adresses
/*
Pré-requis : charger la librairie Google Maps :
<script src="https://maps.googleapis.com/maps/api/js?key=...&sensor=false"></script>
*/
// Adresses
var origin = '191 rue Saint-Jacques, Paris';
var destination = '37 bd Romain Rolland, Montrouge';
// Itinéraire
@sekouzed
sekouzed / itineraire_gmaps_openlayers.js
Created April 21, 2016 16:34 — forked from AdrienVH/itineraire_gmaps_openlayers.js
Utiliser Google Maps pour calculer un itinéraire entre deux adresses, et l'afficher dans une carte OpenLayers
/*
Pré-requis : charger la librairie Google Maps, son module Geometry, et la librairie OpenLayers :
<script src="https://maps.googleapis.com/maps/api/js?key=...&libraries=geometry&sensor=false"></script>
<script src="http://openlayers.org/api/OpenLayers.js"></script>
*/
// Carte
var cartographie = new OpenLayers.Map('carte'); // <div id="carte"></div>
var couche_osm = new OpenLayers.Layer.OSM('OSM');
cartographie.addLayer(couche_osm);
@sekouzed
sekouzed / rails.js
Created January 30, 2016 00:08 — forked from jgrossi/rails.js
Rails jQuery adapter
(function($, undefined) {
/**
* Unobtrusive scripting adapter for jQuery
* https://github.com/rails/jquery-ujs
*
* Requires jQuery 1.8.0 or later.
*
* Released under the MIT license
*
@sekouzed
sekouzed / _ide_helper.php
Created December 29, 2015 12:41 — forked from barryvdh/_ide_helper.php
Laravel IDE Helper for Netbeans / PhpStorm / Sublime Text 2 CodeIntel, generated using https://github.com/barryvdh/laravel-ide-helper
<?php
/**
* A helper file for Laravel 5, to provide autocomplete information to your IDE
* Generated for Laravel 5.1.1 (LTS) on 2015-06-11.
*
* @author Barry vd. Heuvel <[email protected]>
* @see https://github.com/barryvdh/laravel-ide-helper
*/
namespace {
@sekouzed
sekouzed / Example WordPress Simple JSON Endpoint Plugin.txt
Created September 10, 2015 22:50 — forked from dustyf/gist:b6e72a7a7fd05de9598e
Example WordPress Simple JSON Endpoint Plugin
<?php
/**
* Plugin Name: WDS GIF API
* Plugin URI: http://webdevstudios.com
* Description: Adds a Custom Post Type to store GIFs and an API JSON Endpoint to access GIFs by a tag.
* Author: WebDevStudios
* Author URI: http://webdevstudios.com
* Version: 1.0.0
* License: GPLv2
*/
@sekouzed
sekouzed / db.rake
Last active August 29, 2015 14:23 — forked from hopsoft/db.rake
# lib/tasks/db.rake
namespace :db do
desc "Dumps the database to db/APP_NAME.dump"
task :dump => :environment do
cmd = nil
with_config do |app, host, db, user|
cmd = "pg_dump --host #{host} --username #{user} --verbose --clean --no-owner --no-acl --format=c #{db} > #{Rails.root}/db/#{app}.dump"
end
puts cmd