Skip to content

Instantly share code, notes, and snippets.

View baradhili's full-sized avatar

bret watson baradhili

  • 03:27 (UTC +08:00)
View GitHub Profile
@jackdpeterson
jackdpeterson / dock.sh
Created April 4, 2018 18:05
Ubuntu 18.04 - Mixed DPI with 4k Laptop monitor (HiDPI), and two LoDPI monitors (27", 21")
#!/bin/bash
echo "setting frame buffer" &&
xrandr --fb 12800x2880 &&
echo "setting laptop monitor" &&
xrandr --output eDP-1-1 --mode 3840x2160 --rate 60 --primary&&
echo "setting 27 inch monitor" &&
xrandr --output DP-0.2 --mode 2560x1440 --scale-from 5120x2880 --panning 5120x2880+3840+0 --right-of eDP-1-1 &&
echo "setting the samsung monitor" &&
xrandr --output DP-0.1 --mode 1920x1080 --scale-from 3840x2160 --panning 3840x2160+8960+0 --right-of DP-0.2&&
echo "setting global scaling to 2x" &&
@bmaupin
bmaupin / install-old-firefox.sh
Last active December 15, 2022 16:17
Temporarily install old version of Firefox for testing
# Firefox 33 was the last version to support SSLv3 (https://blog.mozilla.org/security/2014/10/14/the-poodle-attack-and-the-end-of-ssl-3-0/)
#firefox_version=33.0
# Firefox 51 was the last version to support NPAPI plugins (e.g. Java) (https://support.mozilla.org/en-US/kb/npapi-plugins)
#firefox_version=51.0
# Firefox 56 was the last version to support XPCOM- and XUL-based add-ons (https://blog.mozilla.org/addons/2016/11/23/add-ons-in-2017/)
#firefox_version=56.0
wget https://ftp.mozilla.org/pub/firefox/releases/$firefox_version/linux-x86_64/en-US/firefox-$firefox_version.tar.bz2
tar -xvf firefox-$firefox_version.tar.bz2
mv firefox firefox-$firefox_version
@seLain
seLain / openproject.conf
Last active November 9, 2023 19:30
nginx config for openproject
# assume :
# - openproject installed in /opt/openproject
# - local port: 6000
# - external port: 6020
server {
listen 6020;
server_name SERVER_DOMAIN_NAME;
root /opt/openproject/public;
@cubicleWar
cubicleWar / SyncController.php
Created October 27, 2017 04:16
Laravel Authentication Proxy Controller for CouchDB/PouchDB Syncing
<?php
//
// SyncController
//
// A controller for Laravel authentication when performing CouchDB syncing.
//
// This controller assumes a user per database approach and that when a user registers with the Laravel
// web app a couchdb_username is generated and stored in the user record. This name is used for the
// creation of a corresponding couchdb user and database.
//
@maxwelleite
maxwelleite / ttf-wine-tahoma-installer.sh
Last active July 20, 2024 15:42
Script to install the latest Wine Tahoma fonts on Ubuntu distros
#!/bin/bash
# Author: Maxwel Leite
# Website: http://needforbits.wordpress.com/
# Description: Script to install the latest Wine Tahoma Regular and Wine Tahoma Bold fonts on Ubuntu distros from the Wine Project.
# The Wine project includes the free and open-source fonts Wine Tahoma Regular and Wine Tahoma Bold released under LGPL
# designed to have identical metrics to the Microsoft Tahoma font. This was done because Tahoma is available by default
# on Windows, and many applications expect the font to be available.
# Dependencies: wget
# Tested: Ubuntu Saucy/Trusty/Xenial/Bionic
# Latest Update: 20/11/2020
@maxwelleite
maxwelleite / ttf-ms-tahoma-installer.sh
Last active May 16, 2024 06:43
Script to install the original Microsoft Tahoma font on Ubuntu distros
#!/bin/bash
# Author: Maxwel Leite
# Website: http://needforbits.wordpress.com/
# Description: Script to install the original Microsoft Tahoma Regular and MS Tahoma Bold (both version 2.60) on Ubuntu distros.
# Dependencies: wget and cabextract
# Tested: Ubuntu Saucy/Trusty/Xenial/Bionic
output_dir="/usr/share/fonts/truetype/msttcorefonts/"
tmp_dir="/tmp/ttf-ms-tahoma-installer"
@ednisley
ednisley / Vacuum Hose Fittings.scad
Created March 7, 2017 19:59
OpenSCAD source code: Shop vacuum hose adapters and fittings
// Vacuum Hose Fittings
// Ed Nisley KE4ZNU July 2016
// March 2017
Layout = "HoseBarb"; // PVCtoHose ExpandRing PipeToPort FVacPipe FVacFitting HoseBarb
//- Extrusion parameters must match reality!
// Print with 2 shells and 3 solid layers
ThreadThick = 0.25;
@JMichaelVelasquez
JMichaelVelasquez / migration-bitbucket-to-github
Created November 27, 2016 21:03
Migrating from BitBucket to GitHub
If you’re anything like me who didn't want to pay for github before their new business strategy, then most likely you use BitBucket or hosted your own (come ‘on, it was free!). Problem with that is now your activities or contributions are fragmented between the different services. Now that I've chosen GitHub, I found myself migrating the git repos.
Here is my copy and paste script I use for migration which also carries your history, which without it, defeats the purpose of it!
$ cd ~/Sites/repo-directory
$ git remote rename origin bitbucket
$ git remote add origin git@github.com:JMichaelVelasquez-change-user/your-new-repo.git
$ git push origin master
@icoloma
icoloma / backup
Last active March 2, 2018 04:45
Backup a Github repository into a local file. Useful when retiring a Github repository, but keeping a backup copy for a rainy day in Dropbox / Drive / Box.
#!/bin/bash
# Backup the repositories indicated in the command line
# Example:
# bin/backup user1/repo1 user1/repo2
set -e
for i in $@; do
FILENAME=$(echo $i | sed 's/\//-/g')
echo "== Backing up $i to $FILENAME.bak"
git clone git@github.com:$i $FILENAME.git --mirror
cd "$FILENAME.git"
@rubo77
rubo77 / rotate-screen.sh
Last active October 9, 2023 11:30
This script rotates the screen and touchscreen input, disables or enbles the touchpad, and dis- or enables the virtual keyboard on a Lenovo Yoga 13 or Yoga 2 Pro (source: http://askubuntu.com/q/405628/34298)
#!/bin/bash
# This script rotates the screen and touchscreen input 90 degrees each time it is called,
# also disables the touchpad, and enables the virtual keyboard accordingly
# by Ruben Barkow: https://gist.github.com/rubo77/daa262e0229f6e398766
#### configuration
# find your Touchscreen and Touchpad device with `xinput`
TouchscreenDevice='ELAN Touchscreen'
TouchpadDevice='SynPS/2 Synaptics TouchPad'