Skip to content

Instantly share code, notes, and snippets.

View robertwe's full-sized avatar
💭
https://github.com/kelseyhightower/kubernetes-the-hard-way

Robert W robertwe

💭
https://github.com/kelseyhightower/kubernetes-the-hard-way
View GitHub Profile
@robertwe
robertwe / git selective merge
Created May 29, 2012 09:55 — forked from katylava/git-selective-merge.md
git selective merge
Example: You have a branch 'refactor' that is quite different from master. You can't merge all of the
commits, or even every hunk in any single commit or master will break, but you have made a lot of
improvements there that you would like to bring over to master.
# on master
> git co -b temp
# on temp
> git merge --no-commit --no-ff refactor

Objective-C on Linux

Just run:

curl -ks https://gist.github.com/nicerobot/5652802/raw/install.sh | bash -
## Configure eth0
#
# vi /etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE="eth0"
NM_CONTROLLED="yes"
ONBOOT=yes
HWADDR=A4:BA:DB:37:F1:04
TYPE=Ethernet
BOOTPROTO=static
@robertwe
robertwe / log
Last active August 29, 2015 14:03
yum provides
$ yum provides /usr/bin/host
Loaded plugins: fastestmirror
...
32:bind-utils-9.8.2-0.17.rc1.el6_4.6.x86_64 : Utilities for querying DNS name servers
Repo : base
Matched from:
Filename : /usr/bin/host
32:bind-utils-9.8.2-0.23.rc1.el6_5.1.x86_64 : Utilities for querying DNS name servers
Repo : updates
@robertwe
robertwe / 0_reuse_code.js
Created April 26, 2016 08:54
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@robertwe
robertwe / jenkins-job-dsl.groovy
Created May 4, 2016 19:23 — forked from stuartstevenson/jenkins-job-dsl.groovy
Jenkins job dsl with distributed job config files. The seed.groovy file scans stash repo branches for jenkins-job-dsl.groovy files and runs them centrally.
Closure job = {
// Job Name
name "${stashProjectKey}-${projectName}-${branchSimpleName}"
// Where should jenkins run the job
label ('master')
// Where should Jenkins get the source code from
scm {
git {
resource "aws_vpc" "vpc" {
cidr_block = "${var.environment["vpc_cidr"]}"
enable_dns_hostnames = true
enable_dns_support = true
instance_tenancy = "default"
tags {
Name = "${var.environment["name"]}-vpc"
TF = "YES"
}
@robertwe
robertwe / augues.pp
Created December 27, 2016 00:16
augeas puppet
augeas { 'grub_conf':
incl => '/boot/grub/grub.conf',
lens => 'grub.lns',
changes => [
'set default 0',
'setm title[1]/kernel swapaccount 1',
'rm title[1]/kernel/quiet',
'rm title[1]/kernel/rhgb'
],
require => Package['kernel-lt']
@robertwe
robertwe / sysctl.pp
Created December 27, 2016 00:25
auges
augeas { "sysctl":
context => '/files/etc/sysctl.conf',
changes => [
'set kernel.keys.root_maxkeys 1000000',
],
}
[root@localhost ~]# augtool ls /files/boot/grub/grub.conf
#comment[1] = grub.conf generated by anaconda
#comment[2] = Note that you do not have to rerun grub after making changes to this file
#comment[3] = NOTICE: You have a /boot partition. This means that
#comment[4] = all kernel and initrd paths are relative to /boot/, eg.
#comment[5] = root (hd0,0)
#comment[6] = kernel /vmlinuz-version ro root=/dev/mapper/VolGroup-lv_root
#comment[7] = initrd /initrd-[generic-]version.img
#comment[8] = boot=/dev/sda
default = 0