Skip to content

Instantly share code, notes, and snippets.

View alunux's full-sized avatar

La Ode Muhammad Fadlun Akbar alunux

  • Chiba, Japan
View GitHub Profile
@alunux
alunux / restart-budgie.sh
Created September 12, 2018 23:22
Restart budgie-panel properly
nohup budgie-panel --replace 2>&1 > /dev/null &
@alunux
alunux / openssl.MD
Created July 3, 2018 00:04 — forked from jchandra74/openssl.MD
HOWTO: Create Your Own Self-Signed Certificate with Subject Alternative Names Using OpenSSL in Ubuntu Bash for Window

HOWTO: Create Your Own Self-Signed Certificate with Subject Alternative Names Using OpenSSL in Ubuntu Bash for Window

Overview

My main development workstation is a Windows 10 machine, so we'll approach this from that viewpoint.

Recently, Google Chrome started giving me a warning when I open a site that uses https and self-signed certificate on my local development machine due to some SSL certificate issues like the one below:

Self-Signed SSL Issue in Chrome

@alunux
alunux / ex_read_tuner.c
Created May 20, 2018 14:43
Compile: gcc -Wall ex_read_tuner.c -o ex_read_tuner
#include <fcntl.h>
#include <sys/ioctl.h>
#include <linux/dvb/frontend.h>
int main(void)
{
struct dvb_frontend_info info_tuner;
int fd = open("/dev/dvb/adapter0/frontend0", O_RDONLY);
@alunux
alunux / gist:9927276da470bdd84e6749c1bdcf76dd
Created May 1, 2018 20:21 — forked from tpot/gist:edd0952f03d744d28a92
SSL front-end proxy nginx configuration for OpenStack
ssl_certificate /etc/ssl/certs/z400cert.pem;
ssl_certificate_key /etc/ssl/private/z400key.pem;
# Keystone
server {
listen 192.168.1.2:5000;
ssl on;
location / {
include /etc/nginx/proxy_params;
@alunux
alunux / gist:bea31b7753895487e635ec7036df1d32
Created May 1, 2018 01:08 — forked from evildmp/gist:3094281
Set up Django, nginx and uwsgi

This document has now been incorporated into the uWSGI documentation:

http://uwsgi-docs.readthedocs.org/en/latest/tutorials/Django_and_nginx.html

Set up Django, nginx and uwsgi

Steps with explanations to set up a server using:

'''This script goes along the blog post
"Building powerful image classification models using very little data"
from blog.keras.io.
It uses data that can be downloaded at:
https://www.kaggle.com/c/dogs-vs-cats/data
In our setup, we:
- created a data/ folder
- created train/ and validation/ subfolders inside data/
- created cats/ and dogs/ subfolders inside train/ and validation/
- put the cat pictures index 0-999 in data/train/cats
## Workaround openstack nova+openvswitch mtu issues when no jumbo frames are available,
## by setting up udev at neutron-gateway to hook on routing interface creation to
## lower the MTU (thus trigger ICMPs for PMTU discovery)
## See: https://blueprints.launchpad.net/neutron/+spec/network-options-mtu
## keywords: openstack, nova, openvswitch, mtu, 1500, no jumbo frames
## Create these two files:
grep -v '^#\|^\s*$' lokasi_berkasnya.conf
#!/bin/bash
# Coba: ./cek-hari-kerja 07 Agustus 2017
declare -A bulanku=(
["januari"]="1"
["februari"]="2"
["maret"]="3"
["april"]="4"
["mei"]="5"
@alunux
alunux / konsole-blur.sh
Created November 24, 2017 10:41
Make konsole's background blur (Works on ZSH)
## Blur effect for Konsole ##
if [[ $(ps --no-header -p $PPID -o comm) =~ '^yakuake|konsole$' ]]; then
for wid in $(xdotool search --pid $PPID); do
xprop -f _KDE_NET_WM_BLUR_BEHIND_REGION 32c -set _KDE_NET_WM_BLUR_BEHIND_REGION 0 -id $wid; done
fi