This file contains hidden or 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
| 0 and chr <<1; | |
| '''#' | |
| 1 | |
| use strict;use warnings; | |
| sub perl{ | |
| map{m&${\uc(q,m,)}&&&($,.=$_,)=~s,[^A-z0-6],,xg}@_;($_=$,) | |
| =~tr$A-Za-z0-9+,$ -_$;for(unpack("u",join('',map(chr(32+ | |
| length($_)*3/4).$_,m$(.{1,60})$gs)))){$.='$_'.'="';map | |
| {$..="\\$_"}unpack('(a3)*',$_.'012');$..='"';eval(${\$.}), | |
| s;\x50++\S{5}+;\u${\substr((caller(0e0))[0b11],-4) |
This file contains hidden or 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
| Configuration ScriptFolder | |
| { | |
| node 'Server1' | |
| { | |
| File ScriptFiles | |
| { | |
| SourcePath = "\\dc1\Share\" | |
| DestinationPath = "C:\scripts" | |
| Ensure = "Present" | |
| Type = "Directory" |
This file contains hidden or 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
| Configuration AtalantaSystemsWebsite | |
| { | |
| param ($MachineName) | |
| Node $MachineName | |
| { | |
| WindowsFeature IIS | |
| { | |
| Ensure = “Present” | |
| Name = “Web-Server” |
This file contains hidden or 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
| $ python setup.py sdist | |
| running sdist | |
| running egg_info | |
| creating src/crucible.egg-info | |
| writing requirements to src/crucible.egg-info/requires.txt | |
| writing src/crucible.egg-info/PKG-INFO | |
| writing top-level names to src/crucible.egg-info/top_level.txt | |
| writing dependency_links to src/crucible.egg-info/dependency_links.txt | |
| writing entry points to src/crucible.egg-info/entry_points.txt | |
| writing manifest file 'src/crucible.egg-info/SOURCES.txt' |
This file contains hidden or 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
| import os | |
| from setuptools import setup, find_packages | |
| version = '0.1.0' | |
| description = "A generator of strong yet memorable passwords" | |
| cur_dir = os.path.dirname(__file__) | |
| try: | |
| long_description = open(os.path.join(cur_dir, 'README.rst')).read() | |
| except: |
This file contains hidden or 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
| sns@pf4:~/src/crucible$ tree -I venv | |
| . | |
| ├── LICENSE.txt | |
| ├── README.rst | |
| ├── setup.py | |
| ├── src | |
| │ └── crucible | |
| │ ├── crucible.py | |
| │ └── __init__.py | |
| └── us-uk-films.txt |
This file contains hidden or 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
| [root@localhost ~]# sed 's/^.\+ release \([.0-9]\+\).*/\1/' /etc/redhat-release | |
| 6.5 | |
| [root@localhost ~]# sed 's/^\(.\+\) release.*/\1/' /etc/redhat-release | tr '[A-Z]' '[a-z]' | |
| centos |
This file contains hidden or 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
| [14] pry(main)> def zorak_hash(keys) | |
| [14] pry(main)* h = {} | |
| [14] pry(main)* keys.times {|e| h[e.succ.to_s] = nil } | |
| [14] pry(main)* h | |
| [14] pry(main)* end | |
| => :zorak_hash | |
| [15] pry(main)> zorak_hash(4) | |
| => {"1"=>nil, "2"=>nil, "3"=>nil, "4"=>nil} |
This file contains hidden or 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
| require 'nokogiri' | |
| require 'open-uri' | |
| news = Nokogiri::HTML(open("https://www.ruby-lang.org/en/news/2013/")) | |
| news.xpath("//div[@class='post']/following-sibling::*").each do |item| | |
| match = item.text.match /Ruby (\S+) is released.*Posted by.*on ((?:\d{1,2} [a-zA-z]{3} \d{4}))/m | |
| if match | |
| puts "Ruby #{match[1]} was announced on #{match[2]}" | |
| end | |
| end |
This file contains hidden or 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
| source 'https://rubygems.org' | |
| gem 'chef', | |
| gem 'berkshelf' | |
| group 'lint' do | |
| gem 'foodcritic' | |
| gem 'strainer' | |
| gem 'tailor' | |
| end |