Skip to content

Instantly share code, notes, and snippets.

@intika
intika / ipvlan_l3_mode_example.md
Created May 4, 2019 20:19 — forked from nerdalert/ipvlan_l3_mode_example.md
IPVlan L3 Mode Two Host Example

Quick Paste Ipvlan L3 Instructions

  • Host #1
ip netns add ns1
ip link add link eth1 ipvl1 type ipvlan mode l3
ip link set dev ipvl1 netns ns1

ip netns exec ns1 bash
@intika
intika / combinedview.html
Created April 22, 2019 10:52 — forked from AlexandreBonneau/combinedview.html
Akregator color workaround on dark breeze theme (see https://bugs.kde.org/show_bug.cgi?id=383404)
<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\">
<html>
<head>
<title>.</title>
<style type="text/css">
@media screen, print {
body {
font-family: {{ standardFamilyFont }} ! important;
font-size: {{ mediumFontSize}}px ! important;
color: white ! important;
@intika
intika / Revert-A-Commit.md
Last active March 21, 2019 22:32 — forked from gunjanpatel/revert-a-commit.md
Git HowTo: revert a commit already pushed to a remote repository

Revert the full commit

Sometimes you may want to undo a whole commit with all changes. Instead of going through all the changes manually, you can simply tell git to revert a commit, which does not even have to be the last one. Reverting a commit means to create a new commit that undoes all changes that were made in the bad commit. Just like above, the bad commit remains there, but it no longer affects the the current master and any future commits on top of it.

git revert {commit_id}'

About History Rewriting

Delete the last commit

Deleting the last commit is the easiest case. Let's say we have a remote origin with branch master that currently points to commit dd61ab32. We want to remove the top commit. Translated to git terminology, we want to force the master branch of the origin remote repository to the parent of dd61ab32:

@intika
intika / Force-Inet4-Or-Inet6.c
Last active February 1, 2019 04:08 — forked from winny-/force-inet4-or-inet6.c
Force IPv4 or IPv6 in applications such as Lynx
/*
force-inet4-or-inet6.c - hack to force applications to use IPv4 or IPv6 exclusively
compilation: cc -fPIC -shared -DUSE_INET4 -o force-inet4.so force-inet4-or-inet6.c
cc -fPIC -shared -DUSE_INET6 -o force-inet6.so force-inet4-or-inet6.c
usage: LD_PRELOAD=/path/to/library.so program args ...
This file is in the public domain.
*/
@intika
intika / Thunderbird-Composetab-3.diff
Last active February 1, 2019 04:10 — forked from liamzebedee/gist:5055929
Thunderbird-Composetab-3
diff -r a49f5ca048d9 calendar/base/content/dialogs/calendar-event-dialog.js
--- a/calendar/base/content/dialogs/calendar-event-dialog.js Sat Jan 12 11:37:57 2013 -0500
+++ b/calendar/base/content/dialogs/calendar-event-dialog.js Thu Feb 28 20:57:59 2013 +1000
@@ -6,6 +6,7 @@
Components.utils.import("resource://gre/modules/Services.jsm");
Components.utils.import("resource://calendar/modules/calRecurrenceUtils.jsm");
Components.utils.import("resource:///modules/mailServices.js");
+Components.utils.import("chrome://messenger/content/msgComposeTab.js");
try {
@intika
intika / Article-Style.css
Last active February 1, 2019 04:12 — forked from bangedorrunt/article-style.css
GoldenDict Dark Theme
body
{
margin-top: 1px;
margin-right: 3px;
margin-left: 2px;
margin-bottom: 3px;
background: #201F1F;
color: white;
font-family: Bookerly, Segoe UI, Palatino Linotype, Arial Unicode MS;
}
### Flatpak Repos
List packages on a repo :
flatpak remote-ls repon-name --user
flatpak remote-ls
Install packages :
flatpak --user install repo-name package-name io.liri.Platform
Flathub:
#!/bin/bash
# Expects Ubuntu 16.06 (xenial) and kernel 4.x.
# Based upon a blog post by Zach at http://zachzimm.com/blog/?p=191
set -eux
# Have the user call sudo early so the credentials is valid later on
sudo whoami
function loadContextAndGoodies(request, return_goodies) {
var loadContext = null;
if (request instanceof Ci.nsIRequest) {
try {
if (request.loadGroup && request.loadGroup.notificationCallbacks) {
loadContext = request.loadGroup.notificationCallbacks.getInterface(Ci.nsILoadContext);
}
} catch (ex) {
console.exception('request loadGroup with notificationCallbacks but oculd not get nsIloadContext', ex);