Skip to content

Instantly share code, notes, and snippets.

Avatar
👋
Hello, world!

ochen1

👋
Hello, world!
View GitHub Profile
@ppoffice
ppoffice / xstartup
Last active Jul 8, 2022
VNC xstartup for Ubuntu Desktop (Gnome)
View xstartup
#!/bin/sh
[ -x /etc/vnc/xstartup ] && exec /etc/vnc/xstartup
[ -r $HOME/.Xresources ] && xrdb $HOME/.Xresources
vncconfig -iconic &
export DESKTOP_SESSION=/usr/share/xsessions/ubuntu.desktop
export XDG_CURRENT_DESKTOP=ubuntu:GNOME
export GNOME_SHELL_SESSION_MODE=ubuntu
export XDG_DATA_DIRS=/usr/share/ubuntu:/usr/local/share/:/usr/share/:/var/lib/snapd/desktop
dbus-launch --exit-with-session /usr/bin/gnome-session --systemd --session=ubuntu
@ochen1
ochen1 / example.py
Last active Nov 6, 2021
Google Login
View example.py
from signal import pause
from rich.console import Console
from google_login import *
console = Console()
console.log("Initializing ChromeOptions...")
options = webdriver.ChromeOptions()
options.headless = False
@MeguminSama
MeguminSama / Discord Experiments.js
Last active Aug 14, 2022
Discord Experiments.js
View Discord Experiments.js
window.___wp = function(e) {
let id = e.c[Object.keys(e.c).find((k) => e.c[k]?.exports?.default?.isDeveloper === false)];
if (id) Object.defineProperty(id.exports.default, "isDeveloper", {get:()=>true});
delete window.___wp;
}
webpackChunkdiscord_app.push([["wp_isdev_patch"], {},window.___wp]);
@oofnikj
oofnikj / answerfile
Last active Aug 15, 2022
Install Docker on Termux
View answerfile
KEYMAPOPTS="us us"
HOSTNAMEOPTS="-n alpine"
INTERFACESOPTS="auto lo
iface lo inet loopback
auto eth0
iface eth0 inet dhcp
hostname alpine
"
TIMEZONEOPTS="-z UTC"
@8bitbuddhist
8bitbuddhist / create-android-display.sh
Last active Jun 8, 2022
Bash script to use an Android device as a second monitor for Linux. See https://blog.8bitbuddhism.com/2019/12/01/how-to-use-your-android-tablet-as-second-monitor/ for detailed instructions.
View create-android-display.sh
#!/bin/bash
# Make sure your Android device is plugged in and accessible over adb.
#### Remember to enable virtual displays in xorg by adding the following to your configuration (e.g. /usr/share/X11/xorg.conf.d/20-virtual.conf)
# Section "Device"
# Identifier "intelgpu0"
# Driver "intel"
# Option "VirtualHeads" "1"
#EndSection
View VMware Workstation 15.x.x serial key
Serial Keys:
FU512-2DG1H-M85QZ-U7Z5T-PY8ZD
CU3MA-2LG1N-48EGQ-9GNGZ-QG0UD
GV7N2-DQZ00-4897Y-27ZNX-NV0TD
YZ718-4REEQ-08DHQ-JNYQC-ZQRD0
GZ3N0-6CX0L-H80UP-FPM59-NKAD4
YY31H-6EYEJ-480VZ-VXXZC-QF2E0
ZG51K-25FE1-H81ZP-95XGT-WV2C0
VG30H-2AX11-H88FQ-CQXGZ-M6AY4
@Davoleo
Davoleo / hosts
Last active Feb 11, 2021
The hosts file entries to block Spotify audio ad servers. | v: 1.0.66.478.g1296534d
View hosts
############## SPOTIFY - ADS - BEGIN
127.0.0.1 media-match.com
127.0.0.1 adclick.g.doublecklick.net
127.0.0.1 www.googleadservices.com
127.0.0.1 pagead2.googlesyndication.com
127.0.0.1 googleads.g.doubleclick.net
127.0.0.1 pubads.g.doubleclick.net
127.0.0.1 securepubads.g.doubleclick.net
127.0.0.1 www.omaze.com
127.0.0.1 omaze.com
@PhilipSchmid
PhilipSchmid / bash-template.sh
Last active Jul 30, 2022
Bash script template (incl. logging functions)
View bash-template.sh
#!/bin/bash
#################################
# Constants / global variables
#################################
LOGFILE='example.log'
LOGLEVEL='INFO'
#################################
# Functions
@safaorhan
safaorhan / mail-settings.md
Created Jun 21, 2018
Yandex pop3 and smtp settings for custom domains
View mail-settings.md

Incoming mail

user name — name@example.com
mail server address — pop.yandex.com
connection security — SSL
port — 995

Outgoing mail

@mccabe615
mccabe615 / phpdangerousfuncs.md
Last active Aug 10, 2022
Dangerous PHP Functions
View phpdangerousfuncs.md

Command Execution

exec           - Returns last line of commands output
passthru       - Passes commands output directly to the browser
system         - Passes commands output directly to the browser and returns last line
shell_exec     - Returns commands output
\`\` (backticks) - Same as shell_exec()
popen          - Opens read or write pipe to process of a command
proc_open      - Similar to popen() but greater degree of control
pcntl_exec - Executes a program