Skip to content

Instantly share code, notes, and snippets.

cd "$1"
mkdir -p flacs
for flac in *.flac
do
out=`echo $flac | sed s/.flac/.ogg/`
ffmpeg -i "$flac" -map_metadata 0 "$out"
mv "$flac" flacs
done
cd -
@mmai
mmai / default.nix
Created October 28, 2019 09:17
Creates a nix-shell environnement for installing apps using pip install
with import <nixpkgs> {};
stdenv.mkDerivation rec {
name = "random-project";
buildInputs = [
python
python37Packages.virtualenv
];
env = buildEnv { name = name; paths = buildInputs; };
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE RankNTypes #-}
module Main where
import Control.Lens
data Game = Game { _player1 :: String } deriving (Show)
makeLenses ''Game
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE OverloadedStrings #-}
module Ready.Habits.UI.Widgets
(
validationButtonsField
) where
import Data.Monoid
import Graphics.Vty -- EvKey, KChar
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Test scrolling</title>
<style>
.header {
clear:both;
}
#left {

Keybase proof

I hereby claim:

  • I am mmai on github.
  • I am mmai (https://keybase.io/mmai) on keybase.
  • I have a public key whose fingerprint is 2BAB 28EB 600F E571 55F6 0330 50AC 7982 A2BC 78E8

To claim this, I am signing this object:

@mmai
mmai / sendGMusicMetadata.py
Last active December 14, 2015 04:39
Update GMusic with new metadatas from a CSV file
#!/usr/bin/env python
from gmusicapi.api import Api
import csv
from settings import settings
def main():
@mmai
mmai / getGMusicLibrary.py
Created February 25, 2013 14:33
Retrieve all user songs from GMusic and save them in a CSV file.
#!/usr/bin/env python
from gmusicapi.api import Api
from django.utils.encoding import smart_str
import csv
from settings import settings
@mmai
mmai / gist:734893
Created December 9, 2010 16:04
Trouve les tweets de Centquarante ne contenant pas 140 caractères
#Trouve les tweets de Centquarante contenant un nombre de caractères différent de 140
#cf. http://twitter.com/#!/Centquarante/status/12787915516026880
#ruby 1.9 requis pour la détection automatique de l'encodage
require 'twitter'
def get_tweets(user, options)
lastid = false
Twitter.user_timeline(user, options).each do |r|
puts r.text.size.to_s + ":#{r.id}:#{r.text}" if r.text.size != 140