Skip to content

Instantly share code, notes, and snippets.

@edgardo001
edgardo001 / tutorialDockerCentos7.md
Last active April 23, 2024 04:47
Tutorial realizado con Docker en Centos 7

Instalar docker en centos 7

$> sudo yum update -y
$> sudo yum install docker
$> sudo systemctl start docker

para que este disponible cuando se inicia la maquina

$> sudo systemctl enable docker
@BensonMuriithi
BensonMuriithi / gameboardtoscreen.py
Last active August 13, 2016 22:47
My solution for 'Tic Tac Toe Draw' exercise on practicepython.org ->http://www.practicepython.org/exercise/2015/11/26/27-tic-tac-toe-draw.html
"""Functions for printing a TicTacToe gameboard to the console
The gameboard should be represented as a 2 dimensional list of 3 rows and 3 columns
"""
element_process = lambda i: ("X" if i == 1 else ("O" if i == 2 else " "))
def printboard(board):
print "\n game = [%s]\n" % ",\n\t ".join(["[%s]" % ", ".join(map(element_process, board[i])) for i in xrange(3)])
@LeCoupa
LeCoupa / bash-cheatsheet.sh
Last active June 28, 2024 14:30
Bash CheatSheet for UNIX Systems --> UPDATED VERSION --> https://github.com/LeCoupa/awesome-cheatsheets
#!/bin/bash
#####################################################
# Name: Bash CheatSheet for Mac OSX
#
# A little overlook of the Bash basics
#
# Usage:
#
# Author: J. Le Coupanec
# Date: 2014/11/04
@ceme
ceme / bash_curl_loop
Last active January 19, 2023 13:07
bash curl loop
while true; do sleep 1; curl http://www.google.com; echo -e '\n\n\n\n'$(date);done
@etoews
etoews / localrc
Last active December 13, 2015 21:59
localrc for Swift only DevStack
ADMIN_PASSWORD=devstack
MYSQL_PASSWORD=devstack
RABBIT_PASSWORD=devstack
SERVICE_PASSWORD=devstack
SERVICE_TOKEN=devstack
SWIFT_HASH=66a3d6b56c1f479c8b4e70ab5c2000f5
SWIFT_REPLICAS=1
# Uncomment the BRANCHes below to use stable versions
@yokolet
yokolet / gist:2176753
Created March 24, 2012 00:34
Rails 3: How to add a new field to an existing database table
Existing schema is below:
ActiveRecord::Schema.define(:version => 20120130161449) do
create_table "movies", :force => true do |t|
t.string "title"
t.string "rating"
t.text "description"
t.datetime "release_date"
t.datetime "created_at"