Skip to content

Instantly share code, notes, and snippets.

View divadsn's full-sized avatar
🎯
Focusing

David Sn divadsn

🎯
Focusing
  • Krakow, Poland
  • 17:44 (UTC +02:00)
View GitHub Profile
@divadsn
divadsn / soundcloud-grabber.py
Last active November 10, 2017 00:13
Some hacky SoundCloud grabber for my radio station
#!/usr/bin/python
# -*- coding: utf-8 -*-
import os
import eyed3
import soundcloud
import sqlite3
import sys
import re
import socket
#!/bin/bash
ACCESS_LOG=/var/log/nginx/access.log
URL=webstats.razex.de
PORT=7890
OUTPUT=/var/www/webstats/index.html
SSL_CERT=/etc/letsencrypt/live/webstats.razex.de/fullchain.pem
SSL_KEY=/etc/letsencrypt/live/webstats.razex.de/privkey.pem
# Shitty workaround, see https://github.com/allinurl/goaccess/issues/600

Keybase proof

I hereby claim:

  • I am divadsn on github.
  • I am divadsn (https://keybase.io/divadsn) on keybase.
  • I have a public key whose fingerprint is 4C78 EF51 59DC 6223 D55E FE14 58E7 0CB5 5FAC 5ACA

To claim this, I am signing this object:

@divadsn
divadsn / 808b.cpp
Created October 12, 2017 09:45
Codeforces solution for 808B
#include <iostream>
#include <cstdio>
using namespace std;
int main() {
int n, k;
cin >> n >> k;
int sum = 0, m;
@divadsn
divadsn / nginx.conf
Created October 7, 2017 23:05
Boosted default nginx.conf, based on https://github.com/denji/nginx-tuning
# default nginx runtime settings
user www-data;
pid /run/nginx.pid;
# you must set worker processes based on your CPU cores, nginx does not benefit from setting more than that
worker_processes auto; #some last versions calculate it automatically
# number of file descriptors used for nginx
# the limit for the maximum FDs on the server is usually set by the OS.
# if you don't set FD's then OS settings will be used which is by default 2000

Welcome to the Lawnchair FAQ

How do I enable blur?

Open Lawnchair's settings, go to UI and under the "Theme" category, toggle the "Enable blur" option.

I enabled blur but it isn't working!

Open the settings, go to "Debug" and tap "Restart Lawnchair".

I can't see my statusbar icons!

Open the settings, go to "Behaviour" and toggle the "Light statusbar" option accordingly.