Skip to content

Instantly share code, notes, and snippets.

View Mikescops's full-sized avatar
🐯
Hey

Corentin Mors Mikescops

🐯
Hey
View GitHub Profile
@Mikescops
Mikescops / Prevent Pasting in Field
Last active August 31, 2021 07:36
Prevent pasting in a field
<html>
<head>
<title>Experiment prevent pasting</title>
</head>
<body>
<h2>Login to your account</h2>
<p for="login">Login</p>
<input type="text" name="login" id="login" value="[email protected]" />
<p for="login">Password</p>
<input type="password" name="password" id="password" />
@Mikescops
Mikescops / Menu Bolt Bootstrap
Created May 14, 2018 15:01
Universal Bolt Menu template made with and for Bootstrap 3.0 by Corentin Mors (7 Jan 2014)
<nav class="navbar navbar-default" role="navigation">
<!-- Brand and toggle get grouped for better mobile display -->
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="{{ paths.root }}">{{ app.config.general.sitename }}</a>
### Keybase proof
I hereby claim:
* I am mikescops on github.
* I am corentin (https://keybase.io/corentin) on keybase.
* I have a public key ASCZwl_30MXxMsKE-w47NHn8tiYnCMUgIEyv7MtN7lxWuQo
To claim this, I am signing this object:
@Mikescops
Mikescops / Random Number Jquery
Last active October 11, 2017 22:03
Generate a random number into html with jQuery process.
<head>
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>
</head>
<body>
<p><a href="no-javascript.html" id="getNumber">Générer</a> un nombre aléatoire. </p>
@Mikescops
Mikescops / Javascript Dailymotion Live Stream Check
Created April 29, 2014 09:49
Check if live stream of any video on Dailymotion is ON in JavaScript.
<script src="http://cdn.jsdelivr.net/jquery/2.1.0/jquery.min.js"></script>
<script type="text/javascript">
// Import JSON data
var dailyAPI = "https://api.dailymotion.com/video/<video_id>?fields=onair";
$.getJSON(dailyAPI, function (json) {
// Set the variables from the results array
@Mikescops
Mikescops / PHP Dailymotion Live Stream Check
Last active August 29, 2015 14:00
Check if live stream of any video on Dailymotion is ON in PHP.
<?php
$url_video = file_get_contents('https://api.dailymotion.com/video/<id_video>?fields=onair'); // change <id_video> by the id of your video.
$json = json_decode($url_video);
if ( $json->onair == 'true')
{
echo "Live en cours";
}
else
{