Skip to content

Instantly share code, notes, and snippets.

View Atalanta's full-sized avatar

Stephen Nelson-Smith Atalanta

  • Ticketmaster
  • Hampshire, UK
View GitHub Profile
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)
Configuration ScriptFolder
{
node 'Server1'
{
File ScriptFiles
{
SourcePath = "\\dc1\Share\"
DestinationPath = "C:\scripts"
Ensure = "Present"
Type = "Directory"
Configuration AtalantaSystemsWebsite
{
param ($MachineName)
Node $MachineName
{
WindowsFeature IIS
{
Ensure = “Present”
Name = “Web-Server”
$ 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'
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:
sns@pf4:~/src/crucible$ tree -I venv
.
├── LICENSE.txt
├── README.rst
├── setup.py
├── src
│   └── crucible
│   ├── crucible.py
│   └── __init__.py
└── us-uk-films.txt
[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
[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}
@Atalanta
Atalanta / gist:9226894
Created February 26, 2014 10:00
Get history of Ruby releases in 2013
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
source 'https://rubygems.org'
gem 'chef',
gem 'berkshelf'
group 'lint' do
gem 'foodcritic'
gem 'strainer'
gem 'tailor'
end