Skip to content

Instantly share code, notes, and snippets.

Reda NOUSHI noushi

  • EDC4IT
  • EMEA Literally
Block or report user

Report or block noushi

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@rafaeltuelho
rafaeltuelho / openshift-cheatsheet.md
Last active Oct 23, 2019
My Openshift Cheatsheet
View openshift-cheatsheet.md

My Openshift Cheatsheet

Openshift build secrets for cloning git repos using SSH Keys

  • To create ssh secret:
oc create secret generic sshsecret \
    --from-file=ssh-privatekey=$HOME/.ssh/id_rsa
@maxtruxa
maxtruxa / Antonyms.md
Last active Nov 5, 2019
A list of common terms used in programming and their respective antonyms.
View Antonyms.md

Antonym List

Note: The table headings (positive/negative) are not necessarily meaningful.

Positive Negative
acquire release
add remove (e.g. an item), subtract (arithmetic)
advance retreat
allocate deallocate (correct), free (common)
allow deny
@yuanying
yuanying / vagrant-kvm.md
Last active Nov 5, 2019
How to use vagrant-kvm
View vagrant-kvm.md

Install Vagrant

sudo su
apt-get update && apt-get install -y libvirt-dev ruby-all-dev apparmor-utils
curl -O -L https://dl.bintray.com/mitchellh/vagrant/vagrant_1.6.5_x86_64.deb
dpkg -i vagrant_1.6.5_x86_64.deb 
aa-complain /usr/lib/libvirt/virt-aa-helper # workaround
exit

Install vagrant-kvm as user

@brianclements
brianclements / dkcleanup.sh
Last active Oct 2, 2019
Bash script helper to remove Docker images and containers.
View dkcleanup.sh
#!/bin/bash
# options:
# remove stopped containers and untagged images
# $ dkcleanup
# remove all stopped|running containers and untagged images
# $ dkcleanup --reset
# remove containers|images|tags matching {repository|image|repository\image|tag|image:tag}
# pattern and untagged images
# $ dkcleanup --purge {image}
@XVilka
XVilka / TrueColour.md
Last active Nov 14, 2019
True Colour (16 million colours) support in various terminal applications and terminals
View TrueColour.md

Terminal Colors

There exists common confusion about terminal colors. This is what we have right now:

  • Plain ASCII
  • ANSI escape codes: 16 color codes with bold/italic and background
  • 256 color palette: 216 colors + 16 ANSI + 24 gray (colors are 24-bit)
  • 24-bit true color: "888" colors (aka 16 milion)
@havenwood
havenwood / bench.md
Last active Dec 12, 2015
Entirely Unscientific Benchmark of Primes in Various Ruby Implementations
View bench.md

Unscientific Benchmark

The Benchmark

def is_prime? n
  (2...n).all? { |i| n % i != 0 }
end

def sexy_primes n
@leifg
leifg / Vagrantfile
Last active Oct 22, 2019
Add a second disk to system using vagrant
View Vagrantfile
file_to_disk = './tmp/large_disk.vdi'
Vagrant::Config.run do |config|
config.vm.box = 'base'
config.vm.customize ['createhd', '--filename', file_to_disk, '--size', 500 * 1024]
config.vm.customize ['storageattach', :id, '--storagectl', 'SATA Controller', '--port', 1, '--device', 0, '--type', 'hdd', '--medium', file_to_disk]
end
@danielbeardsley
danielbeardsley / memcache-stats.sh
Created Aug 2, 2012
Pipe memcache stats into Graphite
View memcache-stats.sh
#!/bin/bash
if [ "$1" != "report" ]; then
echo "Usage:" >&2
script="`basename $0`"
echo " nohup $script report > /var/log/memcache-stats.log &" >&2
exit 1
fi
GRAPHITE_SERVER=localhost
@jmervine
jmervine / bm_test.rb
Created Jul 22, 2012
Benchmark A/B Test Suite
View bm_test.rb
#!/usr/bin/env ruby
require 'benchmark'
# require libs here
iterations = ARGV[0]||100000 # pass in iterations or
@fernandoaleman
fernandoaleman / Linux Static IP
Created Mar 23, 2012
How To Configure Static IP On CentOS 6
View Linux Static IP
## 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
You can’t perform that action at this time.