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
echo "127.0.0.1 AWSVC009 AWSVC009" >> /etc/hosts | |
yum update -y | |
wget https://packages.chef.io/stable/el/5/chef-server-core-12.6.0-1.el5.x86_64.rpm | |
rpm -Uvh chef-server-core-12.6.0-1.el5.x86_64.rpm | |
chef-server-ctl reconfigure | |
mkdir /home/ec2-user/cookbooks | |
chown ec2-user /home/ec2-user/cookbooks | |
mkdir /home/ec2-user/.chef | |
chown ec2-user /home/ec2-user/.chef |
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
; this is not async | |
(defn shell | |
[cmd] | |
(->> (.. Runtime getRuntime (exec cmd) getInputStream) | |
java.io.InputStreamReader. | |
java.io.BufferedReader. | |
line-seq | |
(map str))) | |
; or this is async, use this as script to test it: |
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
class Node: | |
def __init__(self, data=None): | |
self.data = data | |
self.next = None | |
def __str__(self): | |
return str(self.data) | |
class SinglyLinkedList: |
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
def retun_unique(lst): | |
return [i for i in lst if lst.count(i) <= 1] | |
return_unique([1, 9, 8, 8, 7, 6, 1, 6]) # -> [9, 7] | |
return_unique([5, 5, 2, 4, 4, 4, 9, 9, 9, 1]) # -> [2, 1] | |
return_unique([9, 5, 6, 8, 7, 7, 1, 1, 1, 1, 1, 9, 8]) # -> [5, 6] |
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
#!/bin/sh | |
yum install -y java | |
wget -O /etc/yum.repos.d/jenkins.repo http://pkg.jenkins-ci.org/redhat/jenkins.repo | |
rpm --import https://jenkins-ci.org/redhat/jenkins-ci.org.key | |
yum install -y jenkins | |
yum install -y git | |
service jenkins start/stop/restart | |
chkconfig jenkins on |
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
pkgs: attrs: | |
with pkgs; | |
let defaultAttrs = { | |
builder = "${bash}/bin/bash"; | |
args = [ ./builder.sh ]; | |
setup = ./setup.sh; | |
# binutils-unwrapped provides the ar utility | |
baseInputs = [ gnutar gzip gnumake gcc binutils-unwrapped coreutils gawk gnused gnugrep patchelf findutils ]; | |
buildInputs = []; | |
system = builtins.currentSystem; |
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
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDSNWB3aMMJ9skVQKZMzIMHBZaqzD0vdDMb/vEsxA9tWkC5ch7RHXlvT10RaAKQy4eGfL1Os2d9MACvZiqsJ68RzgqP4nWIA/F8kxsPHfBY1WJRKPn/nxW+HHisA2LUts/yIYuK6lszMj/UVFCiaIpd9VDe9MOq1sDHxMS4PnyaWwXIxQ9Ua8Ioj93J9ld2pFwQPSAhWuTg5H7k+MbQgdjNxrZyNNd5bbXQsAlpN7K4gtmf9MWhWpN8HoIDPnz/C/VnzcQasQnkYu4kuuI4yMo7dd4vbttWW5df8w0d1yHmfetglQbj1Ht6Y2fn/skUL7Deqf5JnZlR0Gti4VkoJwih vaevictis | |
ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEA8VVs+gk0ZFbNbx1tnRGTHFD2OBXGOW7yaMUWMXABF7ONM6iN7SwMdioFNvlPkha6UwPtXlYc+59fI21ExW4Th1IGfhanDMvV61AeR3JQmEuwljBAlEZ779OefupHaWwlMOWUBE7mHZCXgUHZbUom6sL8GCQ0smpnyuQNwcpMEN2YxhbU6d3gowKHgixiJXMkcRCqX5QHNtmVCh9kp6lJNoWrmLJT0W9d6aQhX+laui95D89cFifsyo8fHkADew3PIZ9qyqUTQUrP9MC5PFV9wUA9hds3PaMKbPsEh5a69s4MZ8PxK/Qq5t0FqZDp+3EqNzO1Nz2DkoHRt69aMjsGYw== root@f.ro | |
ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEArxPOycq84YnVKRQt3JIon0sgE8s1oPh2qwCISum77+9NMITZ37gS/+gTXgGcuIGPkz1GxGGg/giWqnw/t/XmGNoPD4rqT14EnXnh7wphl+ABxOwAn6NTyIR0VELhMLNvpj9C+VD8YGa9ICMkgAxIK9flI5E9aEgnja9AmaJ5el8jVO0cTTeijFvU228OzOV8gLvTxRjak+JqZ+ |
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
apply plugin: 'java' | |
apply plugin: 'eclipse' | |
apply plugin: 'idea' | |
buildscript { | |
repositories { jcenter() } | |
dependencies { | |
/* check jruby-gradle.org for the latest release */ | |
classpath "com.github.jruby-gradle:jruby-gradle-jar-plugin:1.0.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
FROM alpine:3.4 | |
# skip installing gem documentation | |
RUN mkdir -p /usr/local/etc \ | |
&& { \ | |
echo 'install: --no-document'; \ | |
echo 'update: --no-document'; \ | |
} >> /usr/local/etc/gemrc | |
ENV RUBY_MAJOR 2.4 |
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
apply plugin: 'java' | |
apply plugin: 'eclipse' | |
apply plugin: 'idea' | |
buildscript { | |
repositories { jcenter() } | |
dependencies { | |
/* check jruby-gradle.org for the latest release */ | |
classpath "com.github.jruby-gradle:jruby-gradle-jar-plugin:1.0.1" |
NewerOlder