Skip to content

Instantly share code, notes, and snippets.

View FrBillyD's full-sized avatar

Billy D. FrBillyD

View GitHub Profile
@chaiyujin
chaiyujin / ubuntu_update_booting_kernel.md
Created December 8, 2020 12:42
Ubuntu: Install Kernel and Set GRUB Default Kernel

Ubuntu: Install Kernel and Set GRUB Default Kernel

Install Kernel

Install the default kernel:

sudo apt install linux-generic

Set GRUB Default Kernel

  1. Find entrance from /boot/grub/grub.cfg
    • Get the $menuentry_id_option:
@kiki67100
kiki67100 / Delete-Teams-Messages.js
Last active January 25, 2024 15:08
Delete batch messages Microsoft Teams
/*
By kiki67100 https://gist.github.com/kiki67100
Tested on Google Chrome
Open Microsoft teams web version, select a conversation
Open Developper tools and copy / paste (Change YOUR_NAME by your)
Work on March 2020 maybe no work on the future...
*/
@nestukh
nestukh / installheadlessfirefoxonpi.sh
Last active February 24, 2024 02:38
Install firefox-esr + geckodriver + selenium + python3 on raspberry pi 3 and above
#!/bin/bash
pypcks="python3-pip python3 python3-all-dev python3-dev libffi-dev libssl-dev librtmp-dev python-dev python3 python3-doc python3-tk python3-setuptools tix xvfb python-bluez python-gobject python-dbus python cython python-doc python-tk python-numpy python-scipy python-qt4 python3-pyqt5 python3-pyqt5.q* python3-qtpy python-pyqt5.q* python-lxml fontconfig python-demjson qt5-default libqt5webkit5-dev build-essential libudev-dev python-lxml libxml2-dev libxslt-dev libpq-dev python-pyside python-distlib python-pip python-setuptools" # python-examples python3-examples python-vte
allgoodpcks="ca-certificates virtualenv autotools-dev cdbs git expect libnss3-tools util-linux xvfb curl bridge-utils chromium-browser chromium-chromedriver firefox-esr"
sudo apt-get install --reinstall -y $pypcks $allgoodpcks
if [[ ! -f /usr/lib/chromium-browser/chromedriver ]]; then
sudo ln -s /usr/bin/chromedriver /usr/lib/chromium-browser/chromedriver
fi
@jsonn
jsonn / gandi.py
Created October 23, 2017 12:31
Basic Gandi LiveDNS client
#!/usr/bin/env python
import json
import requests
import sys
APIKEY = "xxx"
def create_domain_record(domain, name, rrtype, ttl, values):
r = requests.post("https://dns.api.gandi.net/api/v5/domains/%s/records" % domain,
@nshtg
nshtg / mysql-docker.sh
Last active April 2, 2024 07:24 — forked from spalladino/mysql-docker.sh
Backup and restore a mysql database from a running Docker mysql container
# Backup
docker exec CONTAINER /usr/bin/mysqldump -u root -pPASSWORD DATABASE > backup.sql
docker exec CONTAINER /usr/bin/mysqldump -u root -pPASSWORD DATABASE | gzip > backup.sql.gz
docker exec CONTAINER /usr/bin/mysqldump -u root -pPASSWORD DATABASE | bzip2 > backup.sql.bz2
# Restore
cat backup.sql | docker exec -i CONTAINER /usr/bin/mysql -u root -pPASSWORD DATABASE
gunzip < backup.sql.gz | docker exec -i CONTAINER /usr/bin/mysql -u root -pPASSWORD DATABASE
bunzip2 < backup.sql.bz2 | docker exec -i CONTAINER /usr/bin/mysql -u root -pPASSWORD DATABASE
@mosquito
mosquito / README.md
Last active May 7, 2024 11:49
Add doker-compose as a systemd unit

Docker compose as a systemd unit

Create file /etc/systemd/system/docker-compose@.service. SystemD calling binaries using an absolute path. In my case is prefixed by /usr/local/bin, you should use paths specific for your environment.

[Unit]
Description=%i service with docker compose
PartOf=docker.service
After=docker.service
@leeramsay
leeramsay / PSADT-Cheatsheet.ps1
Last active April 17, 2024 04:47
PSADT snippits/cheatsheet
## Commonly used PSADT env variables
$envCommonDesktop # C:\Users\Public\Desktop
$envCommonStartMenuPrograms # C:\ProgramData\Microsoft\Windows\Start Menu\Programs
$envProgramFiles # C:\Program Files
$envProgramFilesX86 # C:\Program Files (x86)
$envProgramData # c:\ProgramData
$envUserDesktop # c:\Users\{user currently logged in}\Desktop
$envUserStartMenuPrograms # c:\Users\{user currently logged in}\AppData\Roaming\Microsoft\Windows\Start Menu\Programs
$envSystemDrive # c:
$envWinDir # c:\windows
@alexguirre
alexguirre / Speeches.cs
Last active April 21, 2024 19:11
GTA V Speeches List
This file has been truncated, but you can view the full file.
// Speeches List by alexguirre
// Code in C# using RAGEPluginHook
// Usage example:
// Speech.S_M_Y_SWAT_01_WHITE_FULL_01.GENERIC_CURSE_HIGH_03.PlayOn(ped, SpeechModifier.Force);
namespace Put.Your.Namespace.Here
{
using Rage;
internal struct Speech
@lukas-h
lukas-h / license-badges.md
Last active May 1, 2024 10:20
Markdown License Badges for your Project

Markdown License badges

Collection of License badges for your Project's README file.
This list includes the most common open source and open data licenses.
Easily copy and paste the code under the badges into your Markdown files.

Notes

  • The badges do not fully replace the license informations for your projects, they are only emblems for the README, that the user can see the License at first glance.

Translations: (No guarantee that the translations are up-to-date)

@ludoo0d0a
ludoo0d0a / gist:8d0cfd1cab22598cb5d8
Created June 11, 2015 18:54
Synology boot locked
Sometimes after a hard reboot (power cut), if your synology cannot be logged in with DSM and it shows "System is getting ready. Please log in later" , please do these steps :
#Admin login via ssh
> synobootseq --set-boot-done
> synobootseq --is-ready
#optional
> /usr/syno/etc/rc.d/S97apache-sys.sh start
> /usr/syno/etc/rc.d/S95sshd.sh start