Skip to content

Instantly share code, notes, and snippets.

View fmarcia's full-sized avatar

Franck Marcia fmarcia

  • Cesson-Sévigné, France
View GitHub Profile
@fmarcia
fmarcia / seq.js
Last active October 26, 2017 18:06
// Seq
// Author: Franck Marcia
module.exports = (function () {
"use strict";
function Seq() {
this._error = [];
this._cont = [];
// Tiny jQuery-like toolbox
// Author: Franck Marcia
/*global document,window,XMLHttpRequest*/
var $ = (function () {
"use strict";
function Query(selector, context, content) {
@fmarcia
fmarcia / aur.js
Last active August 29, 2015 14:17
Search and download AUR packages
#!/usr/bin/node
/* -----------------------------------------------------------------------------
* aur.js
* Search and download AUR packages
* Author: Franck Marcia - https://github.com/fmarcia
*/
"use strict";
@fmarcia
fmarcia / radios.m3u
Created March 26, 2015 08:36
Radios playlist
#EXTM3U
#EXTINF:0,FIP
http://mp3.live.tv-radio.com/fip/all/fiphautdebit.mp3
#EXTINF:0,France Culture
http://mp3.live.tv-radio.com/franceculture/all/franceculturehautdebit.mp3
#EXTINF:0,France Inter
http://mp3.live.tv-radio.com/franceinter/all/franceinterhautdebit.mp3
# prompt
autoload -Uz promptinit; promptinit
setopt promptsubst
PS1=$'%B%n@%M:%~ $ %b'
PS2=' > '
# history
setopt sharehistory histignorealldups appendhistory
HISTFILE=~/.histfile
HISTSIZE=9999
@fmarcia
fmarcia / readonly-archlinux-raspberry-.md
Last active January 28, 2017 22:41
Read only Archilinux on raspberry pi

Initial system

Once the sdcard is inserted in your linux laptop, prepare partitions:

# create 1 fat32 partition (100MB)
# create 1 linux partition (remaining space)
# see http://archlinuxarm.org/platforms/armv6/raspberry-pi

# prepare mount points
@fmarcia
fmarcia / lenovo-firmware-update.md
Last active April 10, 2016 07:05
Lenovo firmware Update
wget https://download.lenovo.com/pccbbs/mobiles/jbuj57wd.iso
  • Convert iso to img
geteltorito.pl -o bios.img jbuj57wd.iso
  • Copy img to an USB key
#!/usr/bin/bash
loadkeys fr
# ssd clearing (wiki.archlinux.org/index.php/SSD_memory_cell_clearing)
hdparm -I /dev/sda # and ensure the ssd is not frozen
hdparm --user-master u --security-set-pass MyPaSsWoRd /dev/sda
hdparm -I /dev/sda # in order to check
hdparm --user-master u --security-erase MyPaSsWoRd /dev/sda
@fmarcia
fmarcia / git-change-date.sh
Created November 3, 2016 09:53 — forked from maciej/git-change-date.sh
git: Change the commit and/or author date of git commits.
#!/bin/sh
#
# Change the commit and/or author date of git commits.
#
# change-date [-f] commit-to-change [branch-to-rewrite [commit-date [author-date]]]
#
# If -f is supplied it is passed to "git filter-branch".
#
# If <branch-to-rewrite> is not provided or is empty HEAD will be used.
@fmarcia
fmarcia / Db.php
Created October 24, 2017 16:59
Db PHP class
<?php
/**
* f framework, the lightest framework for PHP 5
*
* Copyright (c) 2007 Franck Marcia
*
* @package f
* @author Franck Marcia
* @copyright (c) 2007 Franck Marcia
* @license http://www.opensource.org/licenses/mit-license.php MIT