Skip to content

Instantly share code, notes, and snippets.

@mrjace
mrjace / dk_group.py
Created March 1, 2019 14:48 — forked from nudomarinero/dk_group.py
Command line interface to group raw and normal files in a Digikam album.
#!/usr/bin/env python3
# -*- coding: utf8 -*-
#####
# Copyright (C) 2015 J. Sabater
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
@mrjace
mrjace / cpu_ps_override.txt
Created March 24, 2017 13:27
CPU Power State Override (Linux)
Performance Mode:
echo performance | sudo tee /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor
A higher performance mode will generally result in higher power consumption too.
Powersave Mode (Default):
echo powersave | sudo tee /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor
You can find out what performance mode you're in right now by running this in terminal:
@mrjace
mrjace / 0. nginx_setup.sh
Created August 2, 2016 01:23 — forked from mikhailov/0. nginx_setup.sh
Nginx + secure pseudo-streaming
# Nginx can serve FLV/MP4 files by pseudo-streaming way without any specific media-server software.
# To do the custom build we use 2 modules: --with-http_secure_link_module --with-http_flv_module
# This module "secure-link" helps you to protect links from stealing away.
#
# NOTE: see more details at coderwall: http://coderwall.com/p/3hksyg
cd /usr/src
wget http://nginx.org/download/nginx-1.5.13.tar.gz
tar xzvf ./nginx-1.5.13.tar.gz && rm -f ./nginx-1.5.13.tar.gz