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
import os, time | |
root_log_dir = "/opt/ossec/logs/alerts" | |
months = [ | |
(1, 'January'), | |
(2, 'February'), | |
(3, 'March'), | |
(4, 'April'), | |
(5, 'May'), |
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
// include the library code: | |
#include <LiquidCrystal.h> | |
// initialize the library with the numbers of the interface pins | |
LiquidCrystal lcd(8, 9, 4, 5, 6, 7); | |
void write_rows(String line1, String line2) { | |
lcd.clear(); | |
lcd.setCursor(0, 0); |
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
--- | |
- hosts: tag_test | |
gather_facts: False | |
sudo: yes | |
vars: | |
- app_user: "pikapika" | |
- app_user_home: "/srv/{{ app_user }}" | |
- current_app_dir: "{{ app_user_home }}/engine/current/" | |
tasks: | |
- user: name={{ app_user }} comment="{{ app_user }} App User" home={{ app_user_home }} |
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
PLAY [tag_test] *************************************************************** | |
TASK: [user name=pikapika comment="pikapika App User" home=/srv/pikapika] ***** | |
<107.167.182.70> ESTABLISH CONNECTION FOR USER: brodul | |
<107.167.182.70> REMOTE_MODULE user name=pikapika comment="pikapika App User" home=/srv/pikapika | |
<107.167.182.70> EXEC ['ssh', '-C', '-tt', '-vvv', '-o', 'ControlMaster=auto', '-o', 'ControlPersist=60s', '-o', 'ControlPath=/home/brodul/.ansible/cp/ansible-ssh-%h-%p-%r', '-o', 'KbdInteractiveAuthentication=no', '-o', 'PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey', '-o', 'PasswordAuthentication=no', '-o', 'ConnectTimeout=10', u'107.167.182.70', "/bin/sh -c 'mkdir -p $HOME/.ansible/tmp/ansible-tmp-1398764093.06-227944966233568 && chmod a+rx $HOME/.ansible/tmp/ansible-tmp-1398764093.06-227944966233568 && echo $HOME/.ansible/tmp/ansible-tmp-1398764093.06-227944966233568'"] | |
<107.167.182.70> PUT /tmp/tmpdVFDvZ TO /home/brodul/.ansible/tmp/ansible-tmp-1398764093.06-227944966 |
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
GLAVNICA, glavnica = 6000, 6000 | |
for each in range(12): | |
obresti = glavnica * (0.2 + each * 0.15) * 30 / 360 / 100 | |
glavnica += obresti | |
print glavnica | |
print glavnica - GLAVNICA |
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 urllib import urlretrieve | |
import collections | |
import hashlib | |
import json | |
import os | |
import pickle | |
import urllib2 | |
url = "http://www.reddit.com/r/wallpapers/.json?limit=100" | |
url_cache = '/home/brodul/.wallpaper_cache' |
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
### | |
# 100 pushup challange shell script | |
# | |
# Dependencies: | |
# - alsa | |
# - alsa-tools | |
# - espeak | |
# | |
### |
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 | |
set -e | |
npm install | |
export PATH="node_modules/.bin:node_modules/hubot/node_modules/.bin:$PATH" | |
# how to parse an ini file in bash :D | |
python3 - <<END | |
import configparser |
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/bash | |
# this is runned as backup_user | |
# the user is in the backup group | |
# Add key | |
if [ -z "$SSH_AUTH_SOCK" ] ; then | |
eval `ssh-agent -s` | |
ssh-add | |
fi |
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
{ | |
packageOverrides = pkgs: rec { | |
atom = | |
with pkgs; | |
let | |
atomEnv = buildEnv { | |
name = "env-atom"; | |
paths = [ |
OlderNewer