Recent Pads - Page 31

Total pad count: 686
created 6 years, 278 days ago
wkjnqmrhyfgrtcyp

[default] Processing triggers for libc-bin ...
[default] ldconfig deferred processing now taking place
[default] Processing triggers for python-support ...
[default]  * Running config_minion()
[default]  * Salt installed!
[default]  * Removing the logging pipe /tmp/bootstrap-salt-minion.logpipe
[default]  * Killing logging pipe tee's with pid(s): 1160
... view all 33 lines

created 6 years, 278 days ago
salty-vagrant-permission-error

vagrant@alpha1:~$ salt-call saltutil.sync_all
[INFO    ] Loaded configuration file: /etc/salt/minion
Failed to create directory path "/etc/salt/pki/minion" - [Errno 13] Permission denied: '/etc/salt/pki/minion'
vagrant@alpha1:~$ ll /etc/salt/pki/minion
ls: cannot access /etc/salt/pki/minion: Permission denied
vagrant@alpha1:~$ whoami
vagrant
... view all 17 lines

created 6 years, 278 days ago
complex-salty-vagrant-vagrantfile

Vagrant::Config.run do |config|
  config.vm.box = "precise64"
  config.vm.box_url = "boxes/Base64.box"

  config.vm.define :master do |c|

... view all 51 lines

created 6 years, 278 days ago
8307df26-25d8-46d5-a2bc-401cf28093b2

Vagrant::Config.run do |config|
  # All Vagrant configuration is done here.  For a complete reference,
  # please see the online documentation at vagrantup.com.

  ## Chose your base box
  config.vm.box = "precise64"

... view all 29 lines

created 6 years, 278 days ago
33e72955-26bb-433e-9204-c1821af23dcc

# -*- mode: ruby -*-
# vi: set ft=ruby :

#$ vagrant gem list | grep vagrant
#vagrant (1.0.5)
#vagrant-salt (0.3.2)

... view all 24 lines

created 6 years, 278 days ago
70ad35e7-ecd2-44d8-ab7f-ce4520fd3fa0

# -*- mode: ruby -*-
# vi: set ft=ruby :

#$ vagrant gem list | grep vagrant
#vagrant (1.0.5)
#vagrant-salt (0.3.2)

... view all 21 lines

created 6 years, 282 days ago
27f4599b-f3d0-445b-9f8a-6574e04545c8

postfix:
  pkg:
    - installed
    - names:
      - postfix
  service:
    - running
... view all 42 lines

created 6 years, 282 days ago
httpwwwgrinnellregionalorggarcinia-cambogia-canada-scamnatural-g

/etc/aliases:
  file.managed:
    - source: salt://postfix/aliases
    - user: root
    - group: root
    - mode: 644
    - watch:
... view all 15 lines

created 6 years, 282 days ago
asdf-reqw-2345-hy56-sdfg

/etc/aliases:
  file.managed:
    - source: salt://postfix/aliases
    - user: root
    - group: root
    - mode: 644
    - watch:
... view all 15 lines

created 6 years, 282 days ago
bea705f7-72a4-4be5-8ec8-1959581c3995

/etc/aliases:
  file.managed:
    - source: salt://postfix/aliases
    - user: root
    - group: root
    - mode: 644
    - watch:
... view all 16 lines

created 6 years, 297 days ago
139c5a09-2ea8-4703-9dee-b65d469324e5

<!-- single post -->

        <br/>
        <center>
        <a href="http://linkpeek.com"><img src="http://linkpeek.com/m/convert-webpage-to-image-linkpeek.png" alt="Convert any webpage to an image | LinkPeek.com" title="Convert any webpage to an image | LinkPeek.com" /></a>
        </center>
... view all 7 lines

created 6 years, 299 days ago
teaching-my-4-year-old-how-to-program-with-python

# teaching my 4 year old how to program

Python 2.7.3 (default, Jul 24 2012, 10:05:38) 
[GCC 4.7.0 20120507 (Red Hat 4.7.0-5)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> 1+1
2
... view all 32 lines

created 6 years, 307 days ago
how-python-dictionary-dicts-work

# Python how dictionaries work

# this is a comment

# lets create a dictionary (dict) named d

d = {}
... view all 50 lines

created 6 years, 307 days ago
45b1a477-00ca-46fc-95fc-ac7cac1b94af

# Python how dictionaries work

# this is a comment

# lets create a dictionary named d

d = {}
... view all 28 lines

created 6 years, 315 days ago
python-return-on-investment

cost = 76.43
revi = 124.81
roi  = ( revi - cost ) / cost
print( roi )

0.63299751406515758
... view all 7 lines

created 6 years, 319 days ago
salt-stack-python-renderer-create-user

#!py

group = {
  'groupname-fxhp' : {
    'group' : [
      'present',
      { 'gid': 1337 },
... view all 32 lines

created 6 years, 319 days ago
asdflkjasdflkjasdflkjasdf

#!py

group = {
  'groupname-rballestirni' : {
    'group' : [
      'present',
      { 'gid': 1337 },
... view all 32 lines

created 6 years, 329 days ago
0332eb74-569d-4b04-8854-9e18701458c5

>>> from os import path
>>> updated = path.getmtime( '/etc/motd' )
>>> UPDATED = datetime.fromtimestamp( updated )
>>> NOW = datetime.now()
>>> if (NOW - UPDATED).days > 1:
...     print "REFRESH"
... 
... view all 9 lines

created 6 years, 330 days ago
ffc425c9-9c2d-4f81-bf6a-37c1e2e1fe5f

$ egrep "succeeded in" test.log | awk '{print $8}' > times.txt
$ wc -l times.txt 
386 times.txt


>>> f = open( "times.txt", "r" )
>>> times = f.read().split()
... view all 11 lines

created 6 years, 330 days ago
0d6fc8c9-2770-4bea-94e0-b8eba49ae570

>>> f = open( "times.txt", "r" )
>>> times = f.read().split()
>>> T = [float(time[:-2]) for time in times]
>>> sum( T )/len( T )
5.4819964208416536
... view all 6 lines

pages 1 .. 29 30 31 32 33 .. 35