Skip to content

Instantly share code, notes, and snippets.

View xeeo's full-sized avatar

Geana Raul xeeo

View GitHub Profile
@xeeo
xeeo / gist:6e99ff4a56af95375621e0f4e2fe0e4c
Created October 25, 2023 12:09
Links - Prow Presentation 2023
https://www.imaginarycloud.com/blog/best-frontend-frameworks/
@xeeo
xeeo / neo4j-on-ubuntu-14.sh
Last active May 24, 2017 08:13
neo4j-on-ubuntu-14.sh
sudo add-apt-repository ppa:webupd8team/java
sudo apt-get update
sudo apt-get install oracle-java8-installer
# sudo update-java-alternatives --jre --set <java8name> // if dealing with multiple java versions
wget -O - https://debian.neo4j.org/neotechnology.gpg.key | sudo apt-key add -
echo 'deb http://debian.neo4j.org/repo stable/' | sudo tee -a /etc/apt/sources.list.d/neo4j.list
sudo apt-get update
sudo apt-get install neo4j=3.2.0
sudo vi /etc/security/limits.conf
# neo4j soft nofile 40000
sudo yum update -y
sudo wget -O /etc/yum.repos.d/jenkins.repo http://pkg.jenkins-ci.org//redhat/jenkins.repo
sudo rpm --import https://pkg.jenkins.io/redhat/jenkins.io.key
sudo yum install jenkins -y
sudo service jenkins start
sudo cat /var/lib/jenkins/secrets/initialAdminPassword
# To change the jenkins user, open the /etc/sysconfig/jenkins (in debian this file is created in /etc/default)
# and change the JENKINS_USER to whatever you want. Make sure that user exists in the system (you can check the
@xeeo
xeeo / docker-install.sh
Last active August 2, 2017 14:12
To install Docker on an Amazon Linux instance
# ubuntu 16.04
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
sudo apt-get update
apt-cache policy docker-ce
sudo apt-get install -y docker-ce
sudo systemctl status docker
sudo usermod -aG docker ${USER}
@xeeo
xeeo / EBS-formating
Created November 17, 2016 16:23
To make an EBS volume available for use on Linux
http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-using-volumes.html
[ec2-user ~]$ lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
xvdf 202:80 0 100G 0 disk
xvda1 202:1 0 8G 0 disk /
[ec2-user ~]$ sudo file -s /dev/xvdf
/dev/xvdf: data
@xeeo
xeeo / commit-msg
Last active February 3, 2023 18:04
Git pre commit hook to block commit if no Jira Ticket is set.
#!/bin/sh
# If commit message doesn't contain LSP or TKP Jira ticket tag and number, commit must fail
if ! [[ -n "$(cat $1 | egrep "^(((LTKP|LSP|TKP)\-\d{2,4}($|\s|\n))|(Merge branch)|(\d+\.\d+\.\d+))")" ]]; then
echo "Insert Jira ticket tag and number in commit message"
echo "\n"
echo "COMMIT FAILED"
echo "\n"
exit 1
else
echo "\n"
@xeeo
xeeo / ex-1.js
Created September 16, 2015 15:50
Coding Styles
'use strict';
var instance = {};
var constructor = function constructor(options) {
instance.options = options || {};
return instance;
};
@xeeo
xeeo / pre-commit
Last active October 1, 2015 16:01
pre-commit
#!/bin/sh
export PATH=/usr/local/bin:$PATH
files=$(git diff --cached --name-only --diff-filter=ACM | grep ".js$")
pass=true
passTest=true
if [ "$files" = "" ]; then
exit 0
fi
@xeeo
xeeo / .jshintrc
Last active September 22, 2015 04:15
.jshintrc
{
"node": true,
"mocha": true,
"jasmine": true,
"browser": true,
"esnext": false,
"bitwise": false,
"curly": false,
"eqeqeq": true,
"latedef": "nofunc",
@xeeo
xeeo / .jscsrc
Last active October 2, 2015 23:42
this if just for fucking all developers :)
{
"disallowArrowFunctions" : true,
"disallowEmptyBlocks": true,
"disallowFunctionDeclarations": true,
"disallowIdentifierNames": [],
"disallowImplicitTypeConversion": ["numeric", "boolean", "binary", "string"], //maybe
"disallowKeywordsOnNewLine": ["else", "while"],
"disallowKeywords": [],
"disallowMixedSpacesAndTabs": true,
"disallowMultipleLineBreaks": true,