This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
yum "Couldn't resolve host 'mirrorlist.centos.org'" for CentOS 6.4 | |
solution from http://chris.m0nk3y.net/blog | |
======== | |
The likely cause of your problem was that the local dns server (bind if you're using virtualmin) isn't allowing recursive lookups, which it should do from localnets. | |
/etc/named.conf, mine contains | |
================ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
; Author: dhaneshkk at gmail com | |
#IfWinActive ahk_class Vim ; "Vim" is Gvim's window name. | |
#InstallKeybdHook | |
Capslock:: | |
Send {LControl Down} | |
KeyWait, CapsLock | |
Send {LControl Up} | |
if ( A_PriorKey = "CapsLock" ) | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
float alpha = 255; | |
float rate = 1; | |
int counter = 0; | |
int line = 0; | |
int direction = -1; | |
//dictionary file to string array. | |
String[] PersonaldictionaryLines = loadStrings("file.txt"); | |
void setup() { | |
size(1500, 300); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
REM modified version of brainman's batch file at https://groups.google.com/forum/#!topic/golang-nuts/QVPKm7pbhds | |
REM setting goroot to my go installation folder. | |
set GOROOT=C:\go | |
REM setting gopath to my go playground folder | |
set GOPATH=C:\Users\****\goplayground | |
Set GOBIN=%GOPATH%\bin | |
set PATH=%PATH%;c:\go\bin;%GOBIN% |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo yum upgrade -y | |
sudo yum install gcc glibc-devel make ncurses-devel openssl-devel autoconf | |
cd /usr/local/src | |
sudo wget http://erlang.org/download/otp_src_R16B03-1.tar.gz | |
sudo tar zxvf otp_src_R16B03-1.tar.gz | |
cd otp_src_R16B03-1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
download rebar executable and make available for all users | |
===================================== | |
//root user | |
su | |
cd /usr/bin/ | |
wget https://github.com/rebar/rebar/wiki/rebar | |
chmod 711 rebar |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- | |
Web Application with Backbone: BEGINNER TUTORIAL | |
Backbone.js is a very popular and light(weight) JavaScript library | |
for building Web Applications. | |
However, learning it I found frustratingly few simple examples of | |
true workable applications with all lines of code explained. | |
Here is my attempt to hack the popular Jerome Gravel-Niquet's Backbone Todo App |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1. add below lines in "/etc/apt/sources.list" file | |
deb mirror://mirrors.ubuntu.com/mirrors.txt precise main restricted universe multiverse | |
deb mirror://mirrors.ubuntu.com/mirrors.txt precise-updates main restricted universe multiverse | |
deb mirror://mirrors.ubuntu.com/mirrors.txt precise-backports main restricted universe multiverse | |
deb mirror://mirrors.ubuntu.com/mirrors.txt precise-security main restricted universe multiverse | |
2. sudo apt-get update |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo apt-get remove --purge vim vim-runtime vim-tiny vim-common vim-gui-common | |
sudo apt-get build-dep vim | |
sudo apt-get install liblua5.1-dev luajit libluajit-5.1 python-dev ruby-dev libperl-dev mercurial libncurses5-dev libgnome2-dev libgnomeui-dev libgtk2.0-dev libatk1.0-dev libbonoboui2-dev libcairo2-dev libx11-dev libxpm-dev libxt-dev | |
sudo rm -rf /usr/local/share/vim | |
sudo mkdir /usr/include/lua5.1/include |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var list = [9,1,7,3,4,2,8,0,5,6]; | |
function chunk(list) { | |
var chunks = []; | |
for(var i=0; i<list.length; i++) { | |
if(list.length % 2 == 1 && i+1 == list.length) { | |
chunks.push(list[i]); | |
} else { | |
if(i % 2 == 0) { | |
chunks.push(Math.max(list[i], list[i+1])); |
OlderNewer