Skip to content

Instantly share code, notes, and snippets.

View cristianciofu's full-sized avatar

Cristian CIOFU cristianciofu

  • Strasbourg, France
View GitHub Profile
@cristianciofu
cristianciofu / bookmarks.xml
Created October 9, 2013 07:37
Radio Tray Radios (Romania + France + Others)
<bookmarks>
<group name="root">
<group name="Romania">
<bookmark name="Europa FM" url="http://www.europafm.ro/&amp;files/live.m3u"/>
<bookmark name="Kiss FM" url="http://80.86.106.136/listen.pls"/>
<bookmark name="Magic FM" url="http://80.86.106.35:9000/listen.pls"/>
<bookmark name="ProFM" url="http://stream.profm.ro:8012/profm.mp3.m3u"/>
<bookmark name="ProFM Oldies" url="http://stream.profm.ro:8222/oldies.mp3.m3u"/>
<bookmark name="ProFM Classic" url="http://stream.profm.ro:8082/clasic.mp3.m3u"/>
<bookmark name="ProFM Jazz" url="http://stream.profm.ro:8212/jazz.mp3.m3u"/>
@cristianciofu
cristianciofu / dialog.html
Created February 2, 2019 10:30 — forked from arthurattwell/dialog.html
Google Sheets script to allow multi-select in cells with data-validation (adapted from https://www.youtube.com/watch?v=dm4z9l26O0I)
<div style="font-family: sans-serif;">
<? var data = valid(); ?>
<form id="form" name="form">
<? if(Object.prototype.toString.call(data) === '[object Array]') { ?>
<? for (var i = 0; i < data.length; i++) { ?>
<? for (var j = 0; j < data[i].length; j++) { ?>
<input type="checkbox" id="ch<?= '' + i + j ?>" name="ch<?= '' + i + j ?>" value="<?= data[i][j] ?>"><?= data[i][j] ?><br>
<? } ?>
<? } ?>
<? } else { ?>
@cristianciofu
cristianciofu / phpDateTimeMondayFirstDay.php
Created June 22, 2013 10:48
Change php's DateTime behavior to use Monday as first day of the week
<?php
// found it here :
// http://stackoverflow.com/questions/13128854/php-datetime-class-change-first-day-of-the-week-to-monday
class EuroDateTime extends DateTime {
// Override "modify()"
public function modify($string) {
@cristianciofu
cristianciofu / leclerc_memory_de_noel_cheat.js
Last active December 6, 2016 10:32
JS + Bookmarklet - cheat Grand Jeu "Memory de Noël" - E.Leclerc
// More details + demo :
// *****************************************************************
// ===> http://cristianciofu.github.io/cheat-game-leclerc/
// *****************************************************************
// #1 : JS version :
var colors=["#0F5858","#F0A458","#50F1FF","#FF0000","#0062F6","#AF0F40","#FF00FF","#0FF4C6","#00CC00"],matches=[];$.each($("#game>div.card"),function(a,b){$.inArray($("#"+b.id).data("id"),matches)<0&&matches.push($("#"+b.id).data("id")),$("#"+b.id).css("border","8px solid "+colors[$.inArray($("#"+b.id).data("id"),matches)])}),$("#game>div.card").click(function(){$(this).css("border","0")});
@cristianciofu
cristianciofu / Default (Windows).json
Last active May 24, 2016 14:38
Sublime Text 2 - installed packages + different personal settings
[
{ "keys": ["ctrl+d"], "command": "run_macro_file", "args": {"file": "Packages/Default/Delete Line.sublime-macro"} },
{ "keys": ["ctrl+shift+up"], "command": "duplicate_line" },
{ "keys": ["ctrl+shift+down"], "command": "duplicate_line" },
{ "keys": ["alt+up"], "command": "swap_line_up" },
{ "keys": ["alt+down"], "command": "swap_line_down" },
{ "keys": ["ctrl+shift+d"], "command": "find_under_expand" },
@cristianciofu
cristianciofu / server.js
Created January 17, 2016 09:27
Express quick server
var express = require("express");
var app = express();
app
.use(express.static('./'))
.get('*', function(req, res) {
res.sendFile(__dirname + '/index.html');
})
.listen(3000);
@cristianciofu
cristianciofu / sl_snippet_654566.xml
Created December 11, 2013 09:07
Sublime Text : getters & setters snippet
<!--
Generate getters and setters for your php sources
usage : gs <tab>
(c) http://akrabat.com/software/improved-sublime-text-2-php-getter-and-setter-generation/
-->
@cristianciofu
cristianciofu / sl_snippet_8657643.xml
Created November 11, 2013 10:58
SublimeText : add jquery snippet Shortcut ==> script:jq[TAB]
<snippet>
<content><![CDATA[
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
]]></content>
<tabTrigger>script:jq</tabTrigger>
<scope>text.html</scope>
</snippet>
@cristianciofu
cristianciofu / childDIVdata.js
Created November 6, 2013 09:40
Get data for all DIVs inside a DIV
$("#parentId").children().each(function(n, i) {
console.log(this.id); // to get the id of the element
console.log($(this).data('name')); // to access data elements - jQuery style
});
@cristianciofu
cristianciofu / exfat_fix
Created September 28, 2013 10:10
Fix for error : Unknown filesystem type 'exfat'
sudo apt-add-repository ppa:relan/exfat
sudo apt-get update
sudo apt-get install fuse-exfat