Skip to content

Instantly share code, notes, and snippets.

View janisz's full-sized avatar
🏠
Working from home

Tomasz Janiszewski janisz

🏠
Working from home
View GitHub Profile
@janisz
janisz / Web.config
Created August 9, 2013 08:24
Transformation for web.config to enable security on QA/Production
<system.serviceModel>
<bindings>
<webHttpBinding>
<binding
xdt:Locator="Condition(@name='webHttpBindingWithJson')">
<security
mode="Transport"
xdt:Transform="SetAttributes(mode)" />
</binding>
</webHttpBinding>
@janisz
janisz / gist:7055987
Created October 19, 2013 13:42
Simple table for documentation header
\begin{tabularx}{\textwidth}{ l | X | X | X | X | X }
\textbf{Projekt} & \multicolumn{5}{ l }{\textbf{[project name]}} \\
\hline\hline
Tytuł& \multicolumn{5}{ l }{[document title]} \\
\hline
Temat & \multicolumn{5}{ l }{[document subject]} \\
\hline
Autorzy & \multicolumn{5}{ l }{[authors]} \\
\hline
File & \multicolumn{5}{ l }{[file]} \\
@unpublished{DDJGRAPHSIM,
author = "T.Janiszewski, K.Dzitkowski, J.Dutkowski",
title = "Algorytmy wyznaczania podobieństwa grafów - Specyfikacja Techniczna",
year = "2013"
month = Oct
note = "Praca w ramach przedmiotu TAiO",
}
@janisz
janisz / Boost install
Created November 27, 2013 20:24
Boost instalation script. Sometimes not working
#!/bin/bash
#Update repositories list
sudo apt-get update
#Completely remove boost
sudo apt-get -y --purge remove libboost-all-dev libboost-doc libboost-dev
sudo rm -f /usr/lib/libboost_*
#Install required packages
@janisz
janisz / ssh_config
Last active December 29, 2015 21:59
SSH key based authentication
## Password less ssh
1. Create new keyfile `ssh-keygen -t rsa -C "your_email@example.com"`
2. Push it to remote server `cat ~/.ssh/<name_of_your_public_key> | ssh <user@host> "mkdir ~/.ssh; cat >> ~/.ssh/authorized_keys"`
3. Add new key to keyvalut `ssh-add id_rsa` if you get error that `Could not open a connection to your authentication agent.` you need to run `ssh-agent bash` and then `ssh-add id_rsa` but this will stay until you log out. So better option is to create config
`vim ~/.ssh/config`
and fill it with following template
Host <host 1>
HostName <host_name_or_ip>
User <user>
@janisz
janisz / .gitconfig
Last active December 31, 2015 06:39
[push]
default = current
[merge]
tool = meld
[alias]
cp = cherry-pick
st = status -s
cl = clone
ci = commit
co = checkout
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <cuda.h>
#define BLOCKS 10
#define THREADS 100
#define ELEMENTS_COUNT (BLOCKS*THREADS)
#define DATA_SIZE (ELEMENTS_COUNT * sizeof(storeElement))
#define COMPRESSED_ELEMENT_SIZE 10
@janisz
janisz / aciart
Created January 18, 2014 20:28
make love not war
_ __ ___ __ _ | | __ ___
| '_ ` _ \ / _` || |/ // _ \
| | | | | || (_| || <| __/
|_| |_| |_| \__,_||_|\_\\___|
_
| | ___ __ __ ___
| | / _ \\ \ / // _ \
| || (_) |\ V /| __/
|_| \___/ \_/ \___|
@janisz
janisz / zpi
Last active August 29, 2015 14:01
ZPI
1. Projekt wg PMBOK:
* ✓ **Powinien mieć ograniczony czas trwania**
* ✓ **Tworzyć unikalne produkty i/lub usługi**
* Może być realizowany wielokrotnie np. produkcja seria monitorów to seria projektów o identycznych wymaganiach
* Jest zarządzany przez sponsora projektu
* Jest zarządzany przez przewodniczącego komitetu sterującego
2. Zmiana w zakresie projektu wg PMBOK, w trakcie trwania projektu:
* Nigdy nie powinna występować
* ✓ **Jest dozwolona**
@janisz
janisz / build.gradle
Created July 10, 2014 08:49
WSDL2Java
repositories.mavenCentral()
configurations { wsdl }
dependencies {
wsdl 'org.apache.axis:axis:1.4'
wsdl 'commons-logging:commons-logging:1.1.1'
wsdl 'javax.xml:jaxrpc:1.1'
wsdl 'commons-discovery:commons-discovery:0.2'
wsdl 'javax.xml.soap:saaj-api:1.3.5'