Skip to content

Instantly share code, notes, and snippets.

View snsinfu's full-sized avatar
🕺
📆🍩🍩🍩📲

snsinfu snsinfu

🕺
📆🍩🍩🍩📲
View GitHub Profile
@snsinfu
snsinfu / README.md
Last active July 26, 2020 07:55
Fedora: Install Visual Studio Code from Microsoft's RPM repository

VSCode on Fedora Linux

See: microsoft/vscode#229 (comment)

Import Microsoft's repository key:

$ cd /tmp
$ curl -fsSLO https://packages.microsoft.com/keys/microsoft.asc
$ sudo rpm --import microsoft.asc
@dojoe
dojoe / dkms-module-signing.md
Last active June 16, 2025 18:14
Make DKMS sign kernel modules on installation, with full script support and somewhat distro independent

On systems with UEFI Secure Boot enabled, recent Linux kernels will only load signed modules, so it's about time DKMS grew the capability to sign modules it's building.

These scripts are extended and scriptified variants of https://computerlinguist.org/make-dkms-sign-kernel-modules-for-secure-boot-on-ubuntu-1604.html and https://askubuntu.com/questions/760671/could-not-load-vboxdrv-after-upgrade-to-ubuntu-16-04-and-i-want-to-keep-secur/768310#768310 and add some error checking, a passphrase around your signing key, and support for compressed modules.

dkms-sign-module is a wrapper for the more generic sign-modules which can also be used outside of DKMS.

Installation

  1. Create a directory under /root, say /root/module-signing, put the three scripts below in there and make them executable: chmod u+x one-time-setup sign-modules dkms-sign-module
@ErikAugust
ErikAugust / spectre.c
Last active January 5, 2025 07:01
Spectre example code
#include <stdio.h>
#include <stdlib.h>
#include <stdint.h>
#ifdef _MSC_VER
#include <intrin.h> /* for rdtscp and clflush */
#pragma optimize("gt",on)
#else
#include <x86intrin.h> /* for rdtscp and clflush */
#endif
@asukakenji
asukakenji / go-stdlib-interface-selected.md
Last active June 16, 2025 14:26
Go (Golang) Standard Library Interfaces (Selected)

Go (Golang) Standard Library Interfaces (Selected)

This is not an exhaustive list of all interfaces in Go's standard library. I only list those I think are important. Interfaces defined in frequently used packages (like io, fmt) are included. Interfaces that have significant importance are also included.

All of the following information is based on go version go1.8.3 darwin/amd64.

@jfacorro
jfacorro / chromecast
Last active April 26, 2023 12:15
Cast X server to chromecast
# https://github.com/thibauts/node-castv2-client
# https://github.com/thibauts/node-castv2
sudo apt-get install xserver-xorg-core
sudo apt-get install xvfb
sudo apt-get install scrot
sudo apt-get install libav-tools
# https://weblog.lkiesow.de/20160215-raspberry-pi-screen-mirroring/
avconv -f x11grab -s 1024x768 -i :0.0 -c:v mpeg4 -f mpegts udp://192.168.0.8:8888

Huge Page まとめ

この文書では、Linux カーネルの機能を中心に、 huge page に関連するメモ リ管理の機能についてまとめる。概観とキーワードの把握、およびリファレン スの提供を目的である。特に non-trasparent な huge page と transparent huge page の違いとそれらの境界を把握することをひとつの主眼としている。 そのため、詳細さと網羅性はスコープ外である。

前置き、または免責

@creaktive
creaktive / rainbarf.zsh
Last active April 10, 2025 09:50
rainbarf sans tmux (to enable, "source rainbarf.zsh", under zsh)
# abort if already under tmux
[[ -n $TMUX_PANE ]] && return
# zsh-specific includes
zmodload -i zsh/datetime
zmodload -i zsh/stat
# place to store the chart
RAINBARF_OUT=~/.rainbarf.out
# update period, in seconds
@jcasimir
jcasimir / sessions_and_conversations.markdown
Created September 11, 2011 23:07
Sessions and Conversations in Rails 3

Sessions and Conversations

HTTP is a stateless protocol. Sessions allow us to chain multiple requests together into a conversation between client and server.

Sessions should be an option of last resort. If there's no where else that the data can possibly go to achieve the desired functionality, only then should it be stored in the session. Sessions can be vulnerable to security threats from third parties, malicious users, and can cause scaling problems.

That doesn't mean we can't use sessions, but we should only use them where necessary.

Adding, Accessing, and Removing Data