Skip to content

Instantly share code, notes, and snippets.

@azimut
azimut / atomic-php56-php-5.6.26-40.diff
Created November 10, 2016 16:13
mod version of the init.d file to fix the start issue
17a18,21
> # Additional environment file
> if [ -f /opt/atomic/atomic-php56/root/etc/sysconfig/php-fpm ]; then
> . /opt/atomic/atomic-php56/root/etc/sysconfig/php-fpm
> fi
25,26c29,30
< pidfile=${PIDFILE-/var/run/php-fpm/php-fpm.pid}
< lockfile=${LOCKFILE-/var/lock/subsys/php-fpm}
---
> pidfile=${PIDFILE-/opt/atomic/atomic-php56/root/var/run/php-fpm/php-fpm.pid}
@azimut
azimut / b.csv
Last active November 15, 2016 06:25
key value date
C 10515.0 04/15/13
C 8144.0 05/05/13
C 5713.0 05/25/13
C 506.0 06/14/13
C 6123.0 07/04/13
C 7483.0 07/24/13
C 5173.0 08/13/13
C 974.0 09/02/13
C 7281.0 09/22/13
@azimut
azimut / build_graph.py
Last active April 10, 2017 22:19
gentoo-bb gentoobb namespace
#!/usr/bin/env python2
import networkx as nx
import os
# decorator==4.0.10
# networkx==1.11
# pydotplus==2.0.2
# pyparsing==2.1.10
#
# http://networkx.github.io/documentation/development/examples/drawing/weighted_graph.html
@azimut
azimut / do.sh
Created July 22, 2017 02:28
Create spectrograms from a bunch of audio files, try also with "rate 4k" to "zoom" bottom part
#!/bin/bash
a=0
for i in ~/music/*mp3; do
((a++))
sox \
"$i" \
-n remix 1 spectrogram \
-m -h \
-p 2 \
-z 80 \
@azimut
azimut / do.py
Last active December 20, 2017 18:21
#!/usr/bin/python3
import os
import base64
from flask import Flask, request, redirect, url_for, send_from_directory, render_template, flash
#from werkzeug.utils import secure_filename
from collections import Counter
import sys
@azimut
azimut / a.lisp
Created August 31, 2018 20:31
nudruz without clllib
;; rsm-mod
(defun %get-powers (k n)
"Get the list of the factor <k> that appears in <n>."
(loop
:with nn = n
:with facts = nil
:while (= (mod nn k) 0) :do
(setf nn (/ nn k))
(push k facts)
@azimut
azimut / lispghost.lisp
Created January 6, 2019 06:47
foxdot pattern into common music
(in-package #:shiny)
;; scuffer version of FoxDot's song "ghost-in-the-machine.py"[1]
;; using lisp's "Common Music" patterns. And some custom helpers[2].
;;
;; [1]: github.com/Qirky/ten-lines-or-less
;; [2]: github.com/azimut/shiny
;;--------------------------------------------------
;; Scale.default="minor"; Clock.bpm=120
(setf (bpm *tempo*) 120f0)
;;--------------------------------------------------
@azimut
azimut / blue-rgb.jpg
Last active January 28, 2019 12:18
asdf
blue-rgb.jpg
@azimut
azimut / log.txt
Created March 4, 2020 02:06
cannot resolve
(emacs@localhost)155> snitch_resolver:do_query("starbucks.com",txt).
snitch_resolver:do_query("starbucks.com",txt).
{dns_rec,{dns_header,49263,true,query,false,true,true,true,
false,0},
[{dns_query,"starbucks.com",txt,in}],
[],[],[]}