Skip to content

Instantly share code, notes, and snippets.

test
test 2
@RichVRed
RichVRed / gitcreate.sh
Created August 27, 2016 22:03 — forked from jerrykrinock/gitcreate.sh
This script create a new repo on github.com, then pushes to it the local repo from the current directory.It is a fork of https://gist.github.com/robwierzbowski/5430952/. Some of Rob's lines just didn't work for me, and to fix them I needed to make it more verbose so that a mere electrical engineer could understand it.
#!/bin/bash
# This script create a new repo on github.com, then pushes the local repo from the current directory to the new remote.
# It is a fork of https://gist.github.com/robwierzbowski/5430952/. Some of Rob's lines just didn't work for me, and to fix them I needed to make it more verbose so that a mere electrical engineer could understand it.
# This script gets a username from .gitconfig. If it indicates that your default username is an empty string, you can set it with
# git config --add github.user YOUR_GIT_USERNAME
# Gather constant vars
@RichVRed
RichVRed / git.docker.build
Created December 7, 2016 19:24
Git trick for building docker images
# source: https://github.com/docker/docker/issues/7198#issuecomment-200964423
As discussed above, when sharing content from your home folder into a container, add a user account with the same UID as yours. Here's a trick to cope if your UID isn't 1000. I assume that each user builds his own docker image from the Dockerfile.
Your Dockerfile should contain:
RUN useradd --uid 1000 -m vagrant
USER vagrant
The constant 1000 is substituted for your actual UID using a git filter. Run the following on your host:
git config filter.uidfix.smudge "sed s/1000/$UID/g"
@RichVRed
RichVRed / linux_fun.md
Created January 9, 2017 20:26 — forked from marianposaceanu/linux_fun.md
How to have some fun using the terminal.

Linux fun-o-matic

How to have some fun using the terminal.

  1. Install cowsay [0] via : sudo apt-get install cowsay
  2. Install fortune [1] via : sudo apt-get install fortune
  3. Make sure you have Ruby installed via : ruby -v
  4. Install the lolcat [2] via : gem gem install lolcat
  5. Profit!
@RichVRed
RichVRed / install.sh
Last active November 4, 2018 14:40 — forked from jtilly/install.sh
Install QCacheGrind on Ubuntu
#!/bin/bash
sudo apt-get install qt5-default
wget http://kcachegrind.sourceforge.net/kcachegrind-0.7.4.tar.gz
tar xvf kcachegrind-0.7.4.tar.gz
cd kcachegrind-0.7.4
qmake && make
sudo install -m 755 qcachegrind/qcachegrind /usr/local/bin
sudo install -m 644 qcachegrind/qcachegrind.desktop \
/usr/local/share/applications/
@RichVRed
RichVRed / vm-resize-hard-disk.md
Created January 31, 2017 17:46 — forked from christopher-hopper/vm-resize-hard-disk.md
Resize a Hard Disk for a Virtual Machine provisioned using Vagrant from a Linux base box to run using VirutalBox.

Resize a Hard Disk for a Virtual Machine

Our Virtual Machines are provisioned using Vagrant from a Linux base box to run using VirutalBox. If the Hard Disk space runs out and you cannot remove files to free-up space, you can resize the Hard Disk using some VirtualBox and Linux commands.

Some assumptions

The following steps assume you've got a set-up like mine, where:

@RichVRed
RichVRed / setup.sh
Created February 15, 2017 17:14
Ubuntu Desktop Apps To Install Upon Initial Setup
# Terminix (Terminal)
# Gis Weather (Weather Indicator)
sudo add-apt-repository ppa:noobslab/apps
sudo apt-get update
sudo apt-get install gis-weather
@RichVRed
RichVRed / git_fix
Created February 16, 2017 21:29
put in ${HOME}/bin/git_fix and `chmod +x` it after you install
#!/bin/sh
USAGE="Command Usage:\n\ngit_fix 'email, name' 'old value' 'new value'\n";
if [ "$#" -ne 3 ]; then
echo ${USAGE}
else
case "$1" in
'email')
echo "Changing email from: '$2' to '$3'"
git filter-branch --env-filter "
if [ \"\$GIT_COMMITTER_EMAIL\" = \"$2\" ]
@RichVRed
RichVRed / .gitlab-ci.yml
Created February 16, 2017 21:44
GitLab CI Static/Dynamic Code Analyzers
# Composer stores all downloaded packages in the vendor/ directory.
# Composer bin directory is set to bin/ directory.
cache:
paths:
- vendor/
- bin/
before_script:
- composer install --quiet
@RichVRed
RichVRed / gitlab-version-chech.sh
Created March 31, 2017 15:45 — forked from samrocketman/gitlab-version-chech.sh
A simple bash script for checking the latest stable version of GitLab
#!/bin/bash
#Sam Gleske
#Mon Apr 28 11:11:10 EDT 2014
#Red Hat Enterprise Linux Server release 6.5 (Santiago)
#Linux 2.6.32-431.el6.x86_64 x86_64
#GNU bash, version 4.1.2(1)-release (x86_64-redhat-linux-gnu)
#DESCRIPTION
# Check the latest stable version and compare with the version of gitlab installed.
# Run daily via cron.