Skip to content

Instantly share code, notes, and snippets.

Avatar
👋
Hello, world!

ochen1

👋
Hello, world!
View GitHub Profile
@ochen1
ochen1 / example.py
Last active Apr 26, 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
@oofnikj
oofnikj / answerfile
Last active May 3, 2021
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 Apr 9, 2021
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 — forked from teomaragakis/spotihosts
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 Apr 21, 2021
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 May 4, 2021
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
@SanderTheDragon
SanderTheDragon / postman-deb.sh
Last active May 5, 2021
A shellscript to create a Postman .deb file, for simple installation on Debian-based Linux distro's. Also creates a .desktop file.
View postman-deb.sh
#!/bin/sh
ls Postman*.tar.gz > /dev/null 2>&1
if [ $? -eq 0 ]; then
echo "Removing old Postman tarballs"
rm -f $(ls Postman*.tar.gz)
fi
curlExists=$(command -v curl)
@fpapado
fpapado / print_today.py
Last active Mar 27, 2021
Gets and prints the tasks for "today", from the Todoist API. Intended to be used alongside https://github.com/Doist/todoist-python.
View print_today.py
# Use the todoist API to get tasks from the current day
import todoist
from datetime import datetime
# Log user in; switch to OAuth eventually...
api = todoist.TodoistAPI()
def get_todays_tasks(email, password):