Skip to content

Instantly share code, notes, and snippets.

tmux cheatsheet

As configured in my dotfiles.

start new:

tmux

start new with session name:

@DavidJRobertson
DavidJRobertson / dbss.cpp
Created April 13, 2012 06:33
Dropbox screenshot tool (rather cobbled together, basically imitates puush.me)
/* Dropbox Screenshot Tool Thingy
* ==============================
* David Robertson - http://davidr.me/
*
* Dependencies:
* - ImageMagick
* - Magick++
* - xclip (on linux - on a mac, be sure to change the COPY part of the settings below)
* - xdotool (required for taking screenshots of the active window only)
* - notify-send (for on-screen notification that a screenshot has just been taken)
@MohamedAlaa
MohamedAlaa / tmux-cheatsheet.markdown
Last active November 20, 2024 03:08
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@vinceallenvince
vinceallenvince / README.md
Last active July 2, 2024 15:12
CI with Travis, github Releases API, gh-pages and npm publish

CI with Travis, GitHub Releases API and gh-pages

When hosting a project on GitHub, it's likely you'll want to use GitHub Pages to host a public web site with examples, instructions, etc. If you're not using a continuous integration service like Travis, keeping your gh-pages site up to date requires continuous wrangling.

The steps below outline how to use Travis CI with GitHub Releases and GitHub Pages to create a "1-button" deployment workflow. After testing and running a release build, Travis will upload your release assets to GitHub. It will also push a new version of your public facing site to GitHub Pages.

Organize your project

Let's assume you are hosting a JavaScript project that will offer a single JavaScript file as a release asset. It's likely you'll organize your files like this.

@nathanielc
nathanielc / gist:9b98350ccbcbf21256d7
Created August 20, 2014 05:07
Minecraft systemd unit file
[root@plex ~]# cat /etc/systemd/system/[email protected]
[Unit]
Description=Minecraft Server %i
[Service]
WorkingDirectory=/opt/minecraft-%i
User=mcserver
ExecStart=/usr/bin/screen -DmS mc-%i /bin/java -Xmx2048M -jar minecraft_server.jar nogui
@rasheedamir
rasheedamir / Install & Configure SonarQube.md
Last active May 29, 2023 15:58
Install & Configure SonarQube

Create Amazon EC2 Instance

  • Ensure that inbound MySQL port 3306 is opened
  • chmod 700 "keypair-name.pem"

Install MySQL

To install MySQL, run the following command from a terminal prompt:

  • sudo apt-get install mysql-server

Ubuntu Server Initial Setup (Outdated)

Update

sudo apt-get update
sudo apt-get upgrade

Install fail2ban

sudo apt-get install fail2ban

@bennylope
bennylope / ffmpeg-watermark.md
Created April 22, 2016 23:17 — forked from webkader/ffmpeg-watermark.md
FFmpeg add a watermark to video

How to Add a Watermark to Video

FFMPEG filters provide a powerful way to programmatically enhance or alter videos, and it’s fairly simple to add a watermark to a video using the overlay filter. The easiest way to install ffmpeg is to download a pre-built binary for your specific platform. Then you don’t have to worry about including and installing all the right dependencies and codecs you will be using.

Once you have ffmpeg installed, adding a watermark is as easy as passing your existing source through an overlay filter like so:

ffmpeg -i test.mp4 -i watermark.png -filter_complex "overlay=10:10" test1.mp4

Basically, we’re passing in the original video, and an overlay image as inputs, then passing it through the filter, and saving the output as test1.mp4.

@kentwait
kentwait / mount_vbox_shared_boot.md
Last active June 20, 2024 12:53
Mount VirtualBox shared folder on boot using fstab

How to mount a VirtualBox shared folder when the Guest OS boots

Problem

While using VirtualBox's Guest Additions to mount shared folders provides a seamless way to mount shared folders, there are also disadvantages.

  • Shared folders will always mount in /media/sf_(share name) unless specified using through vbox drivers in the guest OS
  • Mounting does not happen at boot-time. Applications that require paths at boot will not be able to access the shared folder even after it is mounted - such as Docker.

Solution

Instead of relying on Guest Additions, if you have sudo permissions, shared folders can be mounted at boot-time using fstab. Using this approach allows

@thelegendofbrian
thelegendofbrian / Linux Minecraft Server.markdown
Last active October 26, 2024 18:44
Set up a Minecraft server on Linux server using systemd

Set up a Minecraft server on Linux server using systemd

Set up server daemon

Make a user and group for the Minecraft server

sudo useradd -d /var/minecraft -m -r -U minecraft
sudo adduser brian minecraft
sudo chmod g+s /var/minecraft