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 MySQLdb | |
import MySQLdb.cursors | |
sql = MySQLdb.connect(host="xyz", user="abc",passwd="def",db="f03_gitlab_production",cursorclass=MySQLdb.cursors.DictCursor) | |
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 | |
# Clean up | |
rm -f *.pdf | |
cd source | |
# Entferne altes nicht gitiges | |
git clean -fx | |
cd $WORKSPACE | |
# Latex Base Builder erstellen |
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
$ sudo dpkg --purge $(dpkg -l | grep ^rc | awk '{print $2}' | tr "\n" " ") |
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
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQC3Oz43/FDedO6lXNZttRV/cD0y8taDTnGTGjCF+71NHofdwgJugk17pxSqiE3prPt2T5VfkoO5ol+r8fsSP2qAe8Fz02AdcULb+Z8PrPeMnkp35dkNeQwnnwFknROh/3gQsmFFgZQNDInkI1IYgZAJuD+vqiRtNzT6MGjExT2kaaj/XxadaC4vm+AAh4KT/9m4AXpednGaOaMuu++7BRuNdFFO75ouI41KSl7cATvOzsKjUoHZncS23EAT9Ad7i51TFZ3EB/nBdaNwiNaKxJGU/kMPWtjKT1SnPR8gzz0/DMLhhQE5I2wjamA9IUXLfcyPDaozDVxm6JoxIL5FjlV6K9ML4hBwvSdOYwxXGYdGO1l+3Uou4X1ZNYxGVMHaBroqxKIoXi9LJGLjbsfJKbS5SqAmknCxhpev8cAw1hZz32dh8hnhktA2eaYUWIZA20/vt6ERmWejRruJ3URrQHzgI1v/ZqDzx26XBJ+Fbtn89RYcfDhDuYgYAF5tfDjLHBMowV7dlICLMi8VfLV2NAsnW4TCBI3z8rL63yOGQ/4J2kIrvreUczDYro9RocOHlABhKI0UesrbT3JOf59/aIwRGY+88H2jbD5RGbjYRESXmAoIHmh9519AR5QAo8n+TqitDbzUycz99+nKsN14QwkAQZStf2HEtBq6blo1TxFHqw== christian@pc-christian |
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 | |
from __future__ import print_function | |
from git import Repo | |
import sys | |
import os | |
import shutil | |
def convert_submodule_to_subtree(r, sm, squash=True): |
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
cat /var/log/mail.info | grep relay=gmail | ruby -ne 'm=/^(\S+\s+\S+\s+\S+).*(relay=[^, ]+).*status=(\S+)(.*)$/.match($_); printf "%s %-8s %-60s %s\n", m[1], m[3], m[2], m[4]' |
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
require 'date' | |
require 'net/imap' | |
dictionary = { | |
'a' => 'Junk', | |
'b' => 'NonJunk', | |
'c' => '$label5', | |
'd' => '$label2', | |
'e' => '$label3', | |
'f' => '$label1', |
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
mysql -e "SELECT concat('DROP TABLE IF EXISTS ', table_name, ';') FROM information_schema.tables WHERE table_schema = 'xx';" | tail -n +2 | mysql xx |
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
class StringCalc | |
def self.calc(str) | |
# default regex to split | |
re_split = %r{[\n,]} | |
# regex for custom delimiter | |
m = str.match(%r{^//(.)}) | |
re_split = %r{#{m[1]}} if m | |
# sum initial val |
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
package main | |
import ( | |
log "github.com/Sirupsen/logrus" | |
"sync" | |
"time" | |
) | |
// work short is done right away | |
func workShort(id string) { |
OlderNewer