Skip to content

Instantly share code, notes, and snippets.

View noisy's full-sized avatar

Krzysztof Szumny noisy

View GitHub Profile
* [ ] - are you working on the proper version of...
* file
* git branch
* database
* server instance
* [ ] - are you sure, that all resources are available? (server hiccup, lost internet connection, service not started, etc)
* [ ] - did you clear the cache of the browser?
* [ ] - did you remove old *.pyc files?
* [ ] - did you restart proper server, reload settings?
* [ ] - did you check your git status? (remember, that files added to .gitignore, are not shown, but they can also make a difference)
FROM python:2.7
ENV PYTHONUNBUFFERED 1
RUN apt-get update && apt-get install -y ruby-compass
# Requirements have to be pulled and installed here, otherwise caching won't work
ADD ./requirements /requirements
ADD ./requirements.txt /requirements.txt
RUN pip install -r /requirements.txt
  • - are you working on the proper version of...
    • file
    • git branch
    • database
    • server instance
  • - are you sure, that all resources are available? (server hiccup, lost internet connection, service not started, etc)
  • - did you clear the cache of the browser?
  • - did you remove old *.pyc files?
  • - did you restart proper server, reload settings?
  • - did you check your git status? (remember, that files added to .gitignore, are not shown, but they can also make a difference)
#using https://github.com/gurock/testrail-api/blob/master/python/2.x/testrail.py
from testrail import *
api = APIClient('http://mytrial.testrail.net/')
api.password = 'my password'
api.user = '[email protected]'
case = api.send_get('get_case/1');
print case
@noisy
noisy / new-lines-check.py
Last active August 29, 2015 14:25
Run: python new-lines-check.py
import urllib2
import re
test_diff = """
diff --git a/aaaa.asc b/aaaa.asc
index e6ec784..81c9e30 100644
--- a/aaaa.asc
+++ b/aaaa.asc
-A aaa. B bbb. C ccc.
@noisy
noisy / README.md
Last active August 29, 2015 14:24
Debugowanie

Debugowanie

  • Uruchamianie kodu w bieżącym kontekście
    • za pomocą konsoli
  • Evaluate Expression/Evaluate Code Fragment
FROM fedora
RUN useradd -m fedora_user
RUN echo "fedora_user:mypass" | chpasswd
RUN yum install -y sudo
RUN gpasswd wheel -a fedora_user
USER fedora_user
docker run -p 80:8080 jenkins
FATA[0000] Post http:///var/run/docker.sock/v1.18/containers/create: dial unix /var/run/docker.sock: no such file or directory. Are you trying to connect to a TLS-enabled daemon without TLS?
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"><head>
<style type="text/css">
body {background-color: #ffffff; color: #000000;}
body, td, th, h1, h2 {font-family: sans-serif;}
pre {margin: 0px; font-family: monospace;}
a:link {color: #000099; text-decoration: none; background-color: #ffffff;}
a:hover {text-decoration: underline;}
table {border-collapse: collapse;}
@noisy
noisy / gist:40575149443a47e7b654
Created June 9, 2015 12:34
django orm is awesome!
# doesn't work
self.object.profile.default_role = default_role
self.object.profile.save()
# works
site_profile = self.object.profile
site_profile.default_role = default_role
site_profile.save()