This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// convert 0..255 R,G,B values to binary string | |
RGBToBin = function(r,g,b){ | |
var bin = r << 16 | g << 8 | b; | |
return (function(h){ | |
return new Array(25-h.length).join("0")+h | |
})(bin.toString(2)) | |
} | |
// convert 0..255 R,G,B values to a hexidecimal color string | |
RGBToHex = function(r,g,b){ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{# | |
/** | |
* @file | |
* Foundation 5 Sliding pagination control implementation. | |
* | |
* View that can be used with the pagination module | |
* from the Foundation 5 CSS Toolkit | |
* http://foundation.zurb.com/docs/components/pagination.html | |
* is made to work with knppaginationbundle for symfony 2 | |
* http://knpbundles.com/KnpLabs/KnpPaginatorBundle |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* A mixin which helps you to add depth to elements according to the Google Material Design spec: | |
* http://www.google.com/design/spec/layout/layout-principles.html#layout-principles-dimensionality | |
* | |
* Please note that the values given in the specification cannot be used as is. To create the same visual experience | |
* the blur parameter has to be doubled. | |
* | |
* Author: Florian Kutschera (@gefangenimnetz), Conceptboard GmbH (@conceptboardapp) | |
* | |
* Example usage: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// =========================================== | |
// ABSTRACT CLASSES | |
// =========================================== | |
.BoxShadowHelper(@level: 1){ | |
& when (@level = 1) { | |
box-shadow: 0 1px 3px rgba(0,0,0,0.12), 0 1px 2px rgba(0,0,0,0.24); | |
} | |
& when (@level = 2) { | |
box-shadow: 0 3px 6px rgba(0,0,0,0.16), 0 3px 6px rgba(0,0,0,0.23); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Created by PhpStorm. | |
* User: Vincent | |
* Date: 05/04/2015 | |
* Time: 12:46 | |
*/ | |
$apiKey = 'your-api-key'; | |
$listId = 'your-list-id'; | |
$email = $_POST['email']; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## | |
## Bundle of CA Root Certificates | |
## | |
## Certificate data from Mozilla as of: Wed Feb 25 04:12:04 2015 | |
## | |
## This is a bundle of X.509 certificates of public Certificate Authorities | |
## (CA). These were automatically extracted from Mozilla's root certificates | |
## file (certdata.txt). This file can be found in the mozilla source tree: | |
## http://hg.mozilla.org/releases/mozilla-release/raw-file/default/security/nss/lib/ckfw/builtins/certdata.txt | |
## |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# t is temperature in °C | |
# d is dew Point Temperature in °C | |
import math | |
def get_humidex(t, d): | |
kelvin = 273.15 | |
temperature = t + kelvin | |
dewpoint = d + kelvin |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$element.click(function (e) { | |
e.preventDefault(); | |
var page, | |
speed; | |
page = $(this).attr('href'); | |
speed = 750; | |
$('html, body').animate({ | |
scrollTop: $(page).offset().top |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# vim: fileencoding=utf-8 tw=100 expandtab ts=4 sw=4 : | |
# | |
# monty-hall-problem | |
# copyright (c) 2015 Vincent Loy | |
# Vincent Loy <vincent.loy1@gmail.com> | |
import random | |
class MontyHall: | |
def __init__(self): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# vim: fileencoding=utf-8 tw=100 expandtab ts=4 sw=4 : | |
# | |
# GoodMorningPlanet.com | |
# author : Vincent Loy <vincent.loy@activkonnect.com> | |
# (c) 2015 ActivKonnect | |
""" | |
Repair bad formatted Markdown Files - replace **foo** by #foo | |
only when a line start and end by strong tag | |
""" |
OlderNewer