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 / aria.sh
Created April 30, 2020 03:53 — forked from amrza/aria.sh
Download List of files with aria2
#!/bin/sh
aria2c --dir=./ --input-file=urls.txt --max-concurrent-downloads=1 --connect-timeout=60 --max-connection-per-server=16 --split=16 --min-split-size=1M --human-readable=true --download-result=full --file-allocation=none
date
# Now create this file in the same directory and paste all urls in it: urls.txt
@alunux
alunux / Makefile
Created September 23, 2019 13:43 — forked from xuhdev/Makefile
Makefile template for shared library
# Makefile template for shared library
CC = gcc # C compiler
CFLAGS = -fPIC -Wall -Wextra -O2 -g # C flags
LDFLAGS = -shared # linking flags
RM = rm -f # rm command
TARGET_LIB = libtarget.so # target lib
SRCS = main.c src1.c src2.c # source files
OBJS = $(SRCS:.c=.o)
@alunux
alunux / intro-latest-widevine.md
Created September 9, 2019 12:10 — forked from ruario/intro-latest-widevine.md
Fetches the latest Linux Widevine binary so that it can be used by Vivaldi.

With the release of Vivaldi 2.2, this page is now obsolete and unmaintained. Widevine is fetched automatically on post install of our official packages. The information below and the script are left for historical reasons but will not be updated.

If you are using something newer than Vivaldi 2.2, you should not be using this script as there is simply no need. Any need you think you have for it would be a bug IMHO and thus should be logged in a bug report.


Summary

A bunch of people asked how they could use this script with pure Chromium on Ubuntu. The following is a quick guide. Though I still suggest you at least try Vivaldi. Who knows, you might like it. Worried about proprietary componants? Remember that libwidevinecdm.so is a binary blob you are taking from Chrome, so by following this guide you will have already made your distro less "pure". Also all our additions to the Chromium base are ope

@alunux
alunux / github-pages-custom-domain-gandi-dns-records.md
Created July 6, 2019 12:39 — forked from matt-bailey/github-pages-custom-domain-gandi-dns-records.md
How to set up DNS records on gandi.net to use a custom domain on Github Pages

How to set up DNS records on gandi.net to use a custom domain on Github Pages

You would think it would be easy to find this information, but none of the Github or Gandi documentation is clear so I have recorded the required steps here.

Create the following A records:

@ 1800 IN A 185.199.108.153
@ 1800 IN A 185.199.109.153
@ 1800 IN A 185.199.110.153
@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 / 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:
@alunux
alunux / nginxproxy.md
Created October 28, 2017 09:29 — forked from soheilhy/nginxproxy.md
How to proxy web apps using nginx?

Virtual Hosts on nginx (CSC309)

When hosting our web applications, we often have one public IP address (i.e., an IP address visible to the outside world) using which we want to host multiple web apps. For example, one may wants to host three different web apps respectively for example1.com, example2.com, and example1.com/images on the same machine using a single IP address.

How can we do that? Well, the good news is Internet browsers