Skip to content

Instantly share code, notes, and snippets.

@JackieKu
JackieKu / google-chrome-appimage.sh
Created January 21, 2020 09:30
google-chrome-appimage.sh
#!/bin/sh
rm -rf workdir
set -e
mkdir workdir
docker run --name "${0##*/}-$$" --rm -it -v "$PWD/workdir:/workdir" -w /workdir debian:stable-slim bash -e -c '
apt-get update
apt-get -y install wget file unzip desktop-file-utils glib2.0
@JackieKu
JackieKu / tmux.conf
Last active February 5, 2020 11:11
tmux.conf
# remap prefix from 'C-b' to 'C-a'
unbind C-b
set-option -g prefix C-a
bind-key C-a send-prefix
bind -n C-Left select-window -p
bind -n C-Right select-window -n
bind -n C-Up select-window -t:^
bind -n C-Down select-window -t:$
#include <stdio.h>
#include <stdlib.h>
#include <ctype.h>
#include <unistd.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <netdb.h>
#include <arpa/inet.h>
#include <err.h>
def jobs = Hudson.instance.getItems(AbstractProject.class)
for (job in jobs)
{
for (entry in job.getProperties()) {
def prop = entry.getValue()
if (prop instanceof hudson.security.AuthorizationMatrixProperty) {
for (jobN in jobs) {
if (jobN != job)
jobN.addProperty(prop)
for (job in Hudson.instance.getItems(AbstractProject.class))
{
for (entry in job.getProperties()) {
def prop = entry.getValue()
if (prop instanceof hudson.security.AuthorizationMatrixProperty)
{
println(prop)
job.removeProperty(prop)
}
}
@reg add "HKLM\System\CurrentControlSet\Control\7503491f-4a39-4f84-b231-8aca3e203b94" /ve /d "" /f
#!/bin/bash
if [ "$NDK" = "" ]; then
echo NDK variable not set, assuming ${HOME}/android-ndk
export NDK=${HOME}/android-ndk
fi
if false ; then
echo "Fetching Android system headers"
git clone --depth=1 --branch gingerbread-release git://github.com/CyanogenMod/android_frameworks_base.git ../android-source/frameworks/base
git clone --depth=1 --branch gingerbread-release git://github.com/CyanogenMod/android_system_core.git ../android-source/system/core
#!/bin/bash
sfdisk -l "$@" |
if [[ " $* " == *' -uB '* ]] || [[ " $* " == *' -uS '* ]] ; then
sed -rn "\#^$1#"'{s#^\S+\s+([* ])\s+([0-9]+)[+\-]?\s+([0-9]*)[+\-]?\s+([0-9]+)[+\-]?\s+([0-9a-f]+)\s.*$#\2,\4,\5,\1#;p}'
else
sed -rn "\#^$1#"'{s#^\S+\s+([* ])\s+([0-9]+)[+\-]?\s+([0-9]*)[+\-]?\s+([0-9]+)[+\-]?\s+([0-9]+)[+\-]?\s+([0-9a-f]+)\s.*$#\2,\4,\6,\1#;p}'
fi
default saved
timeout 5
foreground 000000
background CCCCCC
splashimage=/boot/grub/shimako2.xpm.gz
title=Gentoo Linux
kernel /boot/kernel ramdisk_size=4485 real_root=/dev/mapper/vg.safe-rootfs mountopts=user_xattr raid=noautodetect initrd_raid
initrd /boot/initrd