Skip to content

Instantly share code, notes, and snippets.

@htruong
htruong / chroot-to-pi.sh
Last active May 1, 2024 15:29
Chroot to pi sd card
#!/bin/bash
# This script allows you to chroot ("work on")
# the raspbian sd card as if it's the raspberry pi
# on your Ubuntu desktop/laptop
# just much faster and more convenient
# credits: https://gist.github.com/jkullick/9b02c2061fbdf4a6c4e8a78f1312a689
# make sure you have issued
@NMandisa
NMandisa / c3p0_spring_config.xml
Created August 7, 2023 14:49 — forked from rponte/c3p0_spring_config.xml
c3p0 configuration on Spring
<bean id="dataSource" class="com.mchange.v2.c3p0.ComboPooledDataSource" destroy-method="close">
<!-- access configuration -->
<property name="driverClass" value="${jdbc.driverclass}" />
<property name="jdbcUrl" value="${jdbc.url}" />
<property name="user" value="${jdbc.username}" />
<property name="password" value="${jdbc.password}" />
<!-- pool sizing -->
<property name="initialPoolSize" value="9" />
<property name="minPoolSize" value="6" />
<property name="maxPoolSize" value="30" />
@yanyuechuixue
yanyuechuixue / 深入浅出 Greasemonkey
Created April 16, 2020 09:43
一个非常优秀的 油猴脚本开发 、用户脚本开发、develope userscript 的教程。
# 深入浅出 Greasemonkey
版权 © 2005 Mark Pilgrimi
[sebug](http://sebug.net/appdir/) [paper](http://sebug.net/paper/)
这本书、及其样例代码和视频文件都是自由软件。在“GNU 通用公共许可证(自由软件基金会)(版本2以及更新版本)”许可下,您可以随意的再分发和/或修改它们。我们发行这本书、及其样例代码和视频文件,希望它能对您有所帮助。但是我们并没有提供任何担保!请查阅[GNU 通用公共许可证](http://www.ttlsa.com/docs/greasemonkey/#license)获取更多细节。
**目录**
@nitred
nitred / optimal_mtu.md
Last active May 1, 2024 15:22
Wireguard Optimal MTU

About

  • I faced bandwidth issues between a WG Peer and a WG server. Download bandwidth when downloading from WG Server to WG peer was reduced significantly and upload bandwidth was practically non existent.
  • I found a few reddit posts that said that we need to choose the right MTU. So I wrote a script to find an optimal MTU.
  • Ideally I would have liked to have run all possible MTU configurations for both WG Server and WG Peer but for simplicity I choose to fix the WG Server to the original 1420 MTU and tried all MTUs from 1280 to 1500 for the WG Peer.

Testing

  • On WG server, I started an iperf3 server
  • On WG peer, I wrote a script that does the following:
    • wg-quick down wg0
  • Edit MTU in the /etc/wireguard/wg0.conf file
@Atreyagaurav
Atreyagaurav / menu.json
Created February 1, 2021 08:00
dmenu based scripts execution
{
"bgcolor": "black",
"scripts": {
"next-chapter": {
"name": "Next Chapter",
"script": "/home/gaurav/scripts/next_episode.py",
"tooltip": "While in firefox, change the address to next chapter or episode"
},
"log-anime": {
"name": "Animes/Series Log",
@rumansaleem
rumansaleem / clean-up-arch-linux.md
Created May 28, 2019 08:51
Instructions to clean up Arch Linux (Manjaro)

Contents

  • Clean pkg cache
  • Remove unused packages (orphans)
  • Clean cache in /home
  • remove old config files
  • Find and Remove
    • duplicates
    • empty files
    • empty directories
  • broken symlinks
@tomdaley92
tomdaley92 / README.md
Last active May 1, 2024 15:14
Proxmox - SPICE Client setup for MacOS

Proxmox - SPICE client setup for MacOS

  1. Install a working (and compiled) version of virt-viewer. You may view the homebrew package's upstream source on GitHub.

    brew tap jeffreywildman/homebrew-virt-manager
    brew install virt-viewer
  2. Once that's installed should be able make a call remote-viewer with a pve-spice.vv file downloaded from proxmox web interface

@Clybius
Clybius / index.html
Last active May 1, 2024 15:10
Embed AV1/No File Size Capped Videos in Discord
<head>
<meta property="og:image" content="GifToEmbedURL"> # Change the content to the link of a gif of your choice, which will be shown as the embed.
<meta property="og:type" content="video.other">
<meta property="og:video:url" content="VideoToEmbedURL"> # Change the content to the link of a video of your choice. Will work with videos over 50 MB, and even unsupported codecs such as AV1!
<meta property="og:video:width" content="1920"> # Set this to the video's width and height, not required, but will show the video as intended if the aspect ratio and size is correct.
<meta property="og:video:height" content="1080">
</head>