Skip to content

Instantly share code, notes, and snippets.

View hemanth22's full-sized avatar

Hemanth B hemanth22

View GitHub Profile
@yogeek
yogeek / git-gpg-config.md
Last active September 13, 2018 09:48
GIT config

Generate GPG key

gpg --full-gen-key

Get key id

gpg --list-secret-keys --keyid-format LONG

/Users/hubot/.gnupg/secring.gpg
function log() {
echo "[$(date)]$1" | tee -a /var/log/jenkins_userdata.log
}
function waitForJenkins() {
log "Waiting jenkins to launch on 8080..."
while ! nc -z localhost 8080; do
sleep 0.1 # wait for 1/10 of the second before check again
done
@yogeek
yogeek / docker-stack.yml
Created January 16, 2018 23:24
ElasticSearch
version: "3.4"
services:
elasticsearch:
# Remember to "sysctl -w vm.max_map_count=262144" on swarm nodes
image: docker.elastic.co/elasticsearch/elasticsearch:5.6.5
environment:
network.host: 0.0.0.0
discovery.zen.ping.unicast.hosts: elasticsearch
@figaw
figaw / .tmux.conf
Last active September 13, 2018 09:50
tmux basic configuration for labs.play-with-k8s.com
# To get this configuration down,
# curl url-to-raw-gist -o ~/.tmux.conf
#
# Commands are from blogpost,
# http://www.hamvocke.com/blog/a-guide-to-customizing-your-tmux-conf/
#
# if TMUX ain't reading the config, exit and use
# tmux source-file ~/.tmux.conf
# switch panes using Alt-arrow without prefix (ESC is the meta key)
@yob
yob / update.rb
Created September 30, 2016 22:37
Updating a file on github with the contents API
require 'github_api'
contents = Github::Client::Repos::Contents.new(login: "username", password: "password")
file = contents.find('org-name', 'repo-name', '/file/path')
contents.update('conversation', 'tc-ops', '/file/path'
path: '/file/path',
message: 'a commit message',
content: 'new file contents',
sha: file.sha)
@fishnix
fishnix / definition.rb
Created July 11, 2012 15:52
Veewee for rhel63
Veewee::Session.declare({
:cpu_count => '1', :memory_size=> '512',
:disk_size => '10140', :disk_format => 'VDI', :hostiocache => 'off',
:os_type_id => 'RedHat_64',
:iso_file => "rhel-server-6.3-x86_64-dvd.iso",
:iso_md5 => "d717af33dd258945e6304f9955487017", :iso_download_timeout => 1000,
:boot_wait => "10", :boot_cmd_sequence => [
'<Tab> text ks=http://%IP%:%PORT%/ks.cfg<Enter>'
],
:kickstart_port => "7122", :kickstart_timeout => 10000, :kickstart_file => "ks.cfg",
@ravibhure
ravibhure / Git_Cheatsheet.md
Created September 2, 2014 16:15
Git Cheatsheet
@spikeheap
spikeheap / sonar-runner.properties
Last active January 4, 2019 04:50
# A sample sonar-runner.properties file to test Groovy and Javascript in a Grails project # Note that the blank projectBaseDir properties are necessary otherwise Sonar infers # the directory name from the module name, which doesn't apply here.
# A sample sonar-runner.properties file to test Groovy and Javascript in a Grails project
# Note that the blank projectBaseDir properties are necessary otherwise Sonar infers
# the directory name from the module name, which doesn't apply here.
#
# Author: Ryan Brooks (ryan.brooks@ndm.ox.ac.uk)
# required metadata
sonar.projectKey=com.example
sonar.projectName=My Project
sonar.projectVersion=0.1
@deanobalino
deanobalino / azure-pipelines.yml
Last active January 4, 2019 05:39
Example Azure Pipeline YAML file for Azure Functions
pool:
vmImage: 'Ubuntu 16.04'
steps:
- script: |
npm install
displayName: "npm install"
- task: ArchiveFiles@2
displayName: "Archive files"
inputs:
- task: PublishBuildArtifacts@1
inputs:
PathtoPublish: '$(System.DefaultWorkingDirectory)'
name: 'drop'