Skip to content

Instantly share code, notes, and snippets.

fcicq fcicq

Block or report user

Report or block fcicq

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
View ws.txt
cmd /c sc config audiosrv start=auto
net start audiosrv
Set-ItemProperty "HKLM:\SYSTEM\CurrentControlSet\Control\Terminal Server\" -Name fDenyTSConnections -Value 0
Set-ItemProperty "HKLM:\SYSTEM\CurrentControlSet\Control\Terminal Server\WinStations\RDP-Tcp\" -Name UserAuthentication -Value 0
Enable-NetFirewallRule -DisplayGroup "Remote Desktop"
net user ... /add
net localgroup "Remote Desktop Users" xxxx /add
; note about "name='xxxx'"
WMIC USERACCOUNT WHERE "Name='xxxx'" SET PasswordExpires=FALSE
View disable-udp-for-rdp.reg
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services\Client]
"fClientDisableUDP"=dword:00000001
@fcicq
fcicq / wget-cleanup.sh
Created Jan 14, 2019
wget-cleanup.sh (bash only).
View wget-cleanup.sh
#!/bin/bash
rm ~/index.html.* 2>/dev/null || :
rm ~/index.html 2>/dev/null || :
shopt -s nullglob
for f in ~/wget-log.* ~/wget-log; do
(tail $f | fgrep "100%" >/dev/null) && (rm -v $f)
done
[ ! -f ~/wget-log ] && touch ~/wget-log
View systemd-networkd-dhcp.sh
cat <<EOF >/etc/systemd/network/80-dhcp.network
[Match]
Name=en* eth*
[Network]
DHCP=yes
IPv6PrivacyExtensions=true
EOF
systemctl enable systemd-networkd
@fcicq
fcicq / sed-patch.sh
Last active Dec 29, 2018
sed-patch.sh (sed-commands) file. Note: only works on one file at a time!
View sed-patch.sh
f=${@:$#}; diff -u $f <(sed $@) -L a/$f -L b/$f
@fcicq
fcicq / nginx-ods.conf
Created Dec 5, 2018
ODSAgent by nginx
View nginx-ods.conf
error_log stderr crit;
pid /dev/null;
master_process off;
daemon off;
events{}
http{
access_log /dev/stdout;
proxy_temp_path /dev/shm/proxy;
fastcgi_temp_path /dev/shm/fcgi;
uwsgi_temp_path /dev/shm/uwsgi;
@fcicq
fcicq / shmem-xattr.patch
Created Dec 1, 2018
shmem: enable user xattr for tmpfs, for android-x86, original from https://www.spinics.net/lists/linux-mm/msg109775.html
View shmem-xattr.patch
diff --git a/mm/shmem.c b/mm/shmem.c
index 446942677cd4..ba6ddaa4f862 100644
--- a/mm/shmem.c
+++ b/mm/shmem.c
@@ -3157,6 +3157,12 @@ static int shmem_xattr_handler_set(const struct xattr_handler *handler,
return simple_xattr_set(&info->xattrs, name, value, size, flags);
}
+static const struct xattr_handler shmem_user_xattr_handler = {
+ .prefix = XATTR_USER_PREFIX,
@fcicq
fcicq / vmlinux-llvm-lld.patch
Created Oct 23, 2018
fix ld.lld: error: ./arch/x86/kernel/vmlinux.lds:342: at least one side of the expression must be absolute
View vmlinux-llvm-lld.patch
diff --git a/arch/x86/kernel/vmlinux.lds.S b/arch/x86/kernel/vmlinux.lds.S
index f05f00acac89..7fe2ee55c713 100644
--- a/arch/x86/kernel/vmlinux.lds.S
+++ b/arch/x86/kernel/vmlinux.lds.S
@@ -364,7 +364,7 @@ SECTIONS
* Per-cpu symbols which need to be offset from __per_cpu_load
* for the boot processor.
*/
-#define INIT_PER_CPU(x) init_per_cpu__##x = x + __per_cpu_load
+#define INIT_PER_CPU(x) init_per_cpu__##x = ABSOLUTE(x) + __per_cpu_load
View x86-crashkernel-auto-4.14.patch
From: Brian Maly <brian.maly@oracle.com>
Date: Wed, 20 Dec 2017 04:58:08 +0000 (-0500)
Subject: x86: add support for crashkernel=auto
X-Git-Tag: v4.14.14-11~1221
X-Git-Url: http://oss.oracle.com/git/gitweb.cgi?p=linux-uek5.git;a=commitdiff_plain;h=f03174698ead1617281e7cb0b56b937731ce1790;hp=ef29b7a9e060d1034edf0b8584d5231ca96847e9
x86: add support for crashkernel=auto
This patch adds support for "crashkernel=auto" and was backported from RHEL7.
View split-wget
#!/bin/bash
if [ ! -n "$2" ]; then
f=$(basename "$1")
else
f=$2
fi
echo $f
wget -b "$1" -O >(split -da3 -b64m - "${f}.")
You can’t perform that action at this time.