Skip to content

Instantly share code, notes, and snippets.

View jags14385's full-sized avatar
:bowtie:
building stuff

Jags jags14385

:bowtie:
building stuff
View GitHub Profile

Semantic Commit Messages

See how a minor change to your commit message style can make you a better programmer.

Format: <type>(<scope>): <subject>

<scope> is optional

Example

@jags14385
jags14385 / gist:088a8db452fe962c5a812353e074bdb6
Created August 16, 2020 22:54 — forked from CristinaSolana/gist:1885435
Keeping a fork up to date

1. Clone your fork:

git clone [email protected]:YOUR-USERNAME/YOUR-FORKED-REPO.git

2. Add remote from original repository in your forked repository:

cd into/cloned/fork-repo
git remote add upstream git://github.com/ORIGINAL-DEV-USERNAME/REPO-YOU-FORKED-FROM.git
git fetch upstream
@jags14385
jags14385 / login_test.scala
Created August 18, 2018 05:50 — forked from alanphil/login_test.scala
Gatling login example and showing how to pull out the HTTP authorization header into a variable
package test
import scala.concurrent.duration._
import io.gatling.core.Predef._
import io.gatling.http.Predef._
import io.gatling.jdbc.Predef._
class LoginTest extends Simulation {
@jags14385
jags14385 / jessfraz.md
Created July 30, 2018 04:07 — forked from acolyer/jessfraz.md
Containers, operating systems and other fun things from The Morning Paper
Step 1 : Assemble the PC
Step 2 : Create an bootable Ubuntu 18.04 LTS flash drive
install CUDA 9.1 on Ubuntu 18.04 using the .run file & gcc version 6 & g++ version 6
Url : https://askubuntu.com/questions/1028830/install-cuda-on-ubuntu-18-04
Url : https://askubuntu.com/questions/26498/choose-gcc-and-g-version
First erased the current update-alternatives setup for gcc and g++:
sudo update-alternatives --remove-all gcc

Squashing Git Commits

The easy and flexible way

This method avoids merge conflicts if you have periodically pulled master into your branch. It also gives you the opportunity to squash into more than 1 commit, or to re-arrange your code into completely different commits (e.g. if you ended up working on three different features but the commits were not consecutive).

Note: You cannot use this method if you intend to open a pull request to merge your feature branch. This method requires committing directly to master.

Switch to the master branch and make sure you are up to date:

// let tournament = req.body.result.parameters['tournament'];
// console.log("Tournamnent :",tournament);
// var tournamentRef = db.ref('tournaments/' + tournament)
// .orderByChild('startDate');
// tournamentRef.once('value').then(function(snapshot) {
// var startDate = (snapshot.val() && snapshot.val().startDate) || 'Anonymous';
// var tournamentName = (snapshot.val() && snapshot.val().tournamentName) || 'Anonymous';
// response = tournamentName + " starts on " + startDate ;
@jags14385
jags14385 / gist:a5879311183787beb29cadab2dc97038
Last active May 1, 2017 04:33
Selenium Grid + Docker Compose
version: '3'
services:
chromenode:
image: selenium/node-chrome:3.4.0
volumes:
- /dev/shm:/dev/shm
- /var/run/docker.sock:/var/run/docker.sock
container_name: chromenode
hostname: chromenode
@jags14385
jags14385 / Docker-Commands.md
Last active August 31, 2016 01:03
Docker CLI commands

Remove all the conatiners :

docker rm $(docker ps -a -q)

Remove all exited conatiners :

docker rm $(docker ps -a -q -f status=exited)

Remove all dangling images :

docker rmi $(docker images --filter "dangling=true" -q --no-trunc)

Remove all docker images :