This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
auth requisite pam_group.so group=irc luser no_warn | |
auth required pam_unix.so no_warn |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[Match] | |
Name=eth0 | |
[Network] | |
Address=10.20.30.40/24 | |
Address=10.20.30.135/24 | |
Gateway=10.20.30.1 | |
DNS=10.20.30.1 | |
From=10.20.30.40 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
require "dbus" | |
system_bus = DBus::SystemBus.instance | |
session_bus = DBus::SessionBus.instance | |
$networkd_service = system_bus.service("org.freedesktop.network1") | |
$networkd_object = $networkd_service.object("/org/freedesktop/network1") | |
$networkd_properties = $networkd_object["org.freedesktop.DBus.Properties"] | |
$networkd_manager = $networkd_object["org.freedesktop.network1.Manager"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'nokogiri' | |
require 'open-uri' | |
require 'rss' | |
URL = URI("https://community.elitedangerous.com/") | |
doc = Nokogiri::HTML(URL.open) | |
articles = doc.css("div.article").map {|article| [ | |
article.css("h3.galnetNewsArticleTitle a").first.content.strip, #title | |
article.css("h3.galnetNewsArticleTitle a").first.attr("href").strip, #link |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <asm-generic/socket.h> | |
#include <stdio.h> | |
#include <sys/socket.h> | |
#include <unistd.h> | |
#include <netinet/in.h> | |
#include <sys/time.h> | |
#include <netinet/tcp.h> | |
#define NONAGLE 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
RSpotify.authenticate CLIENT_ID, CLIENT_SECRET | |
REDIRECT_URI = "http://localhost:3000" | |
SCOPE = [ | |
"user-read-playback-state", | |
"streaming" | |
] | |
begin |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env fish | |
while true | |
read -P "" input | |
if test $status -ne 0 | |
break | |
end | |
echo $input | |
end | $argv | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name RecipientEmailFixerRoundcube | |
// @version 1 | |
// @grant none | |
// ==/UserScript== | |
function on_mutation() { | |
document.querySelectorAll("body.action-compose li.recipient").forEach(recipient => { | |
if (!recipient.fixed) { | |
const [name, email] = recipient.children |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env fish | |
set packages (paclist core | cut -f1 -d' ') | |
set --erase IFS | |
set parallel 10 | |
set mirror 'http:\/\/ftp.snt.utwente.nl\/pub\/os\/linux\/archlinux\/$repo\/os\/$arch' | |
# setup the config | |
set config (cat pacman.conf | sed \ | |
-e "s/Include = \/etc\/pacman.d\/mirrorlist/Server = $mirror/" \ | |
-e "s/\#ParallelDownloads = 5/ParallelDownloads = $parallel/" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#define COROUTINE static long ip = 0; if (ip) asm ("jmp *%0" : : "r" (ip + 7)); | |
#define YIELD_32(i) asm volatile("movl %1, %%eax \n pop %%rbp \n call 1f\n 1: pop %0 \n ret" : "=m" (ip) : "r" (i)); | |
int fibonacci() { | |
COROUTINE | |
YIELD_32(0); | |
YIELD_32(1); | |
YIELD_32(1); |
NewerOlder