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 / session-install.patch
Created November 15, 2017 04:45
blankon-session-makefile
diff --git a/files/bin/Makefile.am b/files/bin/Makefile.am
index ebd451c..67f86bc 100644
--- a/files/bin/Makefile.am
+++ b/files/bin/Makefile.am
@@ -1,5 +1,5 @@
-all:
+install:
install -m 755 blankon-session $(bindir)
-CLEANFILES= \
@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

@alunux
alunux / test-mediakeys.c
Last active August 29, 2017 22:36
It will control spotify playback. Compile: gcc -Wall `pkg-config --cflags --libs gio-2.0` test-mediakeys.c -o test-mediakeys
/*
* Copyright (C) 2017 La Ode Muh. Fadlun Akbar <[email protected]>
*
* 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 2
* of the License, or (at your option) any later version.
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
@alunux
alunux / json_parser.c
Created May 2, 2017 18:28 — forked from alan-mushi/json_parser.c
Examples for the json-c tutorial.
/*
* A simple example of json string parsing with json-c.
*
* clang -Wall -g -I/usr/include/json-c/ -o json_parser json_parser.c -ljson-c
*/
#include <json.h>
#include <stdio.h>
int main() {
struct json_object *jobj;
headerbar {
min-height: 0;
padding-left: 2px;
padding-right: 2px;
padding-top: 1px;
padding-bottom: 1px;
}
headerbar entry,
headerbar spinbutton,
@alunux
alunux / is_wireless.c
Created April 23, 2017 03:18 — forked from edufelipe/is_wireless.c
C example code to list all network interfaces and check whether they are wireless or not. Linux only. Tested on Ubuntu 10.04 and 12.04, but should be compatible with pretty much everything out there.
#include <string.h>
#include <stdio.h>
#include <unistd.h>
#include <ifaddrs.h>
#include <sys/types.h>
#include <sys/ioctl.h>
#include <sys/socket.h>
#include <linux/wireless.h>
repo --name=fedora --mirrorlist=http://mirrors.fedoraproject.org/metalink?repo=fedora-$releasever&arch=$basearch --excludepkgs=kernel*,perf,perf-debuginfo,python-perf,python-perf-debuginfo
repo --name=updates --mirrorlist=http://mirrors.fedoraproject.org/metalink?repo=updates-released-f$releasever&arch=$basearch --excludepkgs=kernel*,perf,perf-debuginfo,python-perf,python-perf-debuginfo
repo --install --name=alunux-kernel-lts --baseurl=https://copr-be.cloud.fedoraproject.org/results/alunux/kernel-lts/fedora-$releasever-$basearch/
repo --install --name=alunux-budgie-git --baseurl=https://copr-be.cloud.fedoraproject.org/results/alunux/budgie-desktop-git/fedora-$releasever-$basearch/
repo --name="RPMFusion Free" --mirrorlist=http://mirrors.rpmfusion.org/mirrorlist?repo=free-fedora-$releasever&arch=$basearch
repo --name="RPMFusion Free - Updates" --mirrorlist=http://mirrors.rpmfusion.org/mirrorlist?repo=free-fedora-updates-released-$releasever&arch=$basearch
repo --name="RPMFusion Non-Free" --mirrorlist=http://
.scrollbars-visible-always {
// blok kode berikut untuk pengaturan scrollbar pada editor //
/deep/::-webkit-scrollbar {
width: 0.6rem;
height: 0.6rem;
z-index: 99999;
display: none; // baris ini yang membuat scrollbar menjadi tersembunyi secara default
}
/deep/:hover::-webkit-scrollbar {
display: block; // baris ini yang membuat scrollbar terlihat saat cursor mengarah kepadanya
@alunux
alunux / dummy-web-server.py
Created August 25, 2016 02:33 — forked from bradmontgomery/dummy-web-server.py
a minimal http server in python. Responds to GET, HEAD, POST requests, but will fail on anything else.
#!/usr/bin/env python
"""
Very simple HTTP server in python.
Usage::
./dummy-web-server.py [<port>]
Send a GET request::
curl http://localhost
headerbar {
min-height: 0;
padding-left: 2px;
padding-right: 2px;
padding-top: 1px;
padding-bottom: 1px;
}
headerbar entry,
headerbar spinbutton,