Skip to content

Instantly share code, notes, and snippets.

💭
Life

Efreak Efreak

💭
Life
Block or report user

Report or block Efreak

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@cerebrate
cerebrate / README.md
Last active Aug 14, 2019
Recompile your WSL2 kernel - support for snaps, apparmor, lxc, etc.
View README.md

Recompile your WSL2 kernel - support for snaps, apparmor, lxc, etc.

Yes, I've done this, and yes, it works. It is, however, entirely unsupported and assembled through reasonable guesswork, so if you try this and it explodes your computer, brain, career, relationships, or anything else, you agree that you take sole responsibility for doing it, that I never claimed it was a good idea, and that you didn't get these instructions from me .

Also note: I have done this with Debian Stretch. While one kernel ought to fit all, some of the packages you need to build it may be different. Adapting to other distros is up to you.

Step One: Install the stuff you need to build the kernel

@whid-injector
whid-injector / HuddledTricks.psm1
Created Nov 21, 2017 — forked from Jaykul/HuddledTricks.psm1
Stupid PowerShell Tricks
View HuddledTricks.psm1
#Requires -version 2.0
## Stupid PowerShell Tricks
###################################################################################################
add-type @"
using System;
using System.Runtime.InteropServices;
public class Tricks {
[DllImport("user32.dll")]
private static extern bool ShowWindowAsync(IntPtr hWnd, int nCmdShow);
@nikonthethird
nikonthethird / Snake.ps1
Last active Aug 14, 2019
PowerShell script for playing Snake.
View Snake.ps1
#Requires -Version 5.1
Using Assembly PresentationCore
Using Assembly PresentationFramework
Using Namespace System.Collections.Generic
Using Namespace System.ComponentModel
Using Namespace System.Linq
Using Namespace System.Reflection
Using Namespace System.Text
Using Namespace System.Windows
Using Namespace System.Windows.Input
@egmontkob
egmontkob / Hyperlinks_in_Terminal_Emulators.md
Last active Sep 10, 2019
Hyperlinks in Terminal Emulators
View Hyperlinks_in_Terminal_Emulators.md
@tubaterry
tubaterry / fingerguns.zsh-theme
Last active Aug 14, 2019
ZSH prompt with finger guns 👉 😎 👉 (requires emoji support)
View fingerguns.zsh-theme
# Don't forget to set COMPLETION_WAITING_DOTS=false in your .zshrc - it doesn't always play nice with multiline prompts
#Broken down into its component pieces because I was tired of looking at a nearly incomprehensible string
USER=$'%{$fg_bold[green]%}%n@%m%{$reset_color%}'
TIMESTAMP=$'%{$fg[blue]%}%D{[%X]}%{$reset_color%}'
CWD_DISPLAY=$'%{$fg[white]%}[%~]%{$reset_color%}'
SHELL_DISPLAY=$'%{$fg_bold[blue]%}%#%{$reset_color%}'
#We use the %G to 'glitch' zsh into forcing the string to take up 3 character widths %{string%3G%}
GUNS_WAITING=$'%(?.%{👆😎👆%3G%}.%{👎😠👎%3G%})'
@stefanbuck
stefanbuck / upload-github-release-asset.sh
Last active Sep 1, 2019
Script to upload a release asset using the GitHub API v3.
View upload-github-release-asset.sh
#!/usr/bin/env bash
#
# Author: Stefan Buck
# License: MIT
# https://gist.github.com/stefanbuck/ce788fee19ab6eb0b4447a85fc99f447
#
#
# This script accepts the following parameters:
#
# * owner
@gcmurphy
gcmurphy / cve_2016_0728.c
Last active Sep 18, 2018 — forked from PerceptionPointTeam/cve_2016_0728.c
cve_2016_0728 exploit
View cve_2016_0728.c
/* $ gcc cve_2016_0728.c -o cve_2016_0728 -lkeyutils -Wall */
/* $ ./cve_2016_072 PP_KEY */
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/types.h>
#include <keyutils.h>
#include <unistd.h>
#include <time.h>
@Jooshboy
Jooshboy / power_status.sh
Created Jan 7, 2016
Returns AC connection status from an AXP209 PMU via I2C
View power_status.sh
#!/bin/sh
# This program gets the power status (AC IN or BAT)
# I2C interface with AXP209
#
#######################################################################
# Copyright (c) 2014 by RzBo, Bellesserre, France
#
# Permission is granted to use the source code within this
# file in whole or in part for any use, personal or commercial,
# without restriction or limitation.
@Jooshboy
Jooshboy / battery_info.sh
Created Jan 7, 2016
Gets battery status information from an AXP209 PMU via I2C
View battery_info.sh
#!/bin/sh
# This program gets the battery info from PMU
# Voltage and current charging/discharging
#
# Nota : temperature can be more than real because of self heating
#######################################################################
# Copyright (c) 2014 by RzBo, Bellesserre, France
#
# Permission is granted to use the source code within this
# file in whole or in part for any use, personal or commercial,
View aria2c.sh
#!/bin/sh
### BEGIN INIT INFO
# Provides: aria2c
# Required-Start: $network $syslog $local_fs
# Required-Stop: $network $syslog $local_fs
# Should-Start: $local_fs
# Should-Stop: $local_fs
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
You can’t perform that action at this time.