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
# -*- mode: ruby -*- | |
# vi: set ft=ruby : | |
Vagrant.configure(2) do |config| | |
config.vm.box = "ubuntu/vivid64" | |
config.vm.network "forwarded_port", guest: 2375, host: 2375, auto_correct: true | |
config.vm.network :private_network, ip: "172.17.8.100" | |
config.vm.provider "virtualbox" do |vb| | |
vb.gui = false |
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
diff --git i/viewstart/viewstart.service w/viewstart/viewstart.service | |
index f6cd660..c2c0fc0 100644 | |
--- i/viewstart/viewstart.service | |
+++ w/viewstart/viewstart.service | |
@@ -13,6 +13,7 @@ ExecStartPre=/bin/sh -c 'docker ps -a | grep ${NAME} > /dev/null; if [ $? -eq 0 | |
ExecStart=/usr/bin/docker run --name ${NAME} -v /src:/src -v /input:/input ${IMAGE} | |
ExecStop=/bin/sh -c 'docker ps | grep ${NAME} > /dev/null; if [ $? -eq 0 ] ; then docker stop ${NAME} ; fi' | |
ExecStopPost=/bin/sh -c 'docker ps -a | grep ${NAME} > /dev/null; if [ $? -eq 0 ] ; then docker rm ${NAME} ; fi' | |
+ExecStopPost=/usr/bin/sudo /usr/sbin/poweroff |
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
--- i/src/mcash/mcash/core/person/api/v1/handlers/addressbook.py | |
+++ w/src/mcash/mcash/core/person/api/v1/handlers/addressbook.py | |
@@ -202,7 +202,7 @@ class AddressBookHandler(BasePersonHandler): | |
raise ndb.Return(filter(None, res)) | |
@secure(level=AuthLevel.TWOFACTOR) | |
- @schemas(input_form=forms.AddressBookRequestForm, output_form=forms.AddressBookResponseForm, validate_input=True) | |
+ @schemas(input_form=forms.AddressBookRequestForm, output_form=None, validate_input=True) | |
@ndb.tasklet | |
def get(self, *args, **kwargs): |
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
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
import sys | |
def try_to(text): | |
try: | |
after = text.encode('ascii') | |
except UnicodeEncodeError: | |
after = text.encode('utf-8') | |
except UnicodeDecodeError: |
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
#!/bin/bash | |
WHAT=${1:-ngrok} | |
if [ hash ${WHAT} 2>/dev/null ]; then | |
echo original found ${WHAT} | |
else | |
echo original failed ${WHAT} | |
fi |
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
CREATE KEYSPACE c4476 WITH replication = {'class': 'SimpleStrategy', 'replication_factor': 1}; | |
USE c4476; | |
CREATE TABLE users ( | |
userid uuid, | |
age int, | |
firstname text, | |
lastname text, | |
PRIMARY KEY (userid) |
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
#!/bin/sh | |
echo 'mit keresel?' | |
read mit_keresek | |
# vegyunk minden file-t az adott directory-ban | |
for filenev in ./* | |
do | |
sor=`grep ${mit_keresek} ${filenev}` | |
# a $? az elozo parancs kimenete, ennek az erteke 0, ha megtalalta | |
# es 1, ha nem talalta meg |
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
#!/usr/bin/env python | |
import sys | |
import traceback | |
def f(x): | |
a = x / 0 | |
return a | |
def g(): | |
a = {} |
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
#!/bin/sh | |
if [ $(id -u) -ne 0 ] | |
then | |
echo 'Please run it as root' | |
exit 99 | |
fi | |
for X in CPAN JSON XML::Simple | |
do |
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
#!/bin/sh | |
set -e | |
knife search node -r 'role:conversionservice_worker_*' | |
for KEY in default url export | |
do | |
for ID in `knife search node -i "role:conversionservice_worker_${KEY} AND run_list:conversionservice_worker_${KEY}" | grep private` | |
do | |
echo Preparing ${ID} in ${KEY} |