Skip to content

Instantly share code, notes, and snippets.

View DavidHamburg's full-sized avatar

David Hamburg DavidHamburg

  • ifu Hamburg GmbH
  • Hamburg, Germany
View GitHub Profile
@DavidHamburg
DavidHamburg / checkout_remotes.sh
Created May 20, 2017 23:19
git: checkout all remote branches
git branch -r | grep -v '\->' | while read remote; do git branch --track "${remote#origin/}" "$remote"; done
@DavidHamburg
DavidHamburg / Dockerfile
Last active May 23, 2017 21:35
Arch Container to test PKGBUILD installation
FROM dock0/full_arch:latest
RUN yes "" | pacman -S base-devel
ADD https://gist.githubusercontent.com/0x414c/061183b58167c49e11ff3b1fcfe11fe1/raw/5aafb9464734fef8fe95117c0e16501b15f904e2/makepkg-unsafe.sh /build/makepkg.sh
RUN chmod +x /build/makepkg.sh
WORKDIR /build
COPY PKGBUILD /build/PKGBUILD
RUN ./makepkg.sh -s --noconfirm
git branch | grep -v "master" | xargs git branch -D
git fetch --prune
git clean -xfd
@DavidHamburg
DavidHamburg / install-python.ps1
Created May 16, 2017 16:11
install-python.ps1
mkdir C:\\install;
Invoke-WebRequest https://www.python.org/ftp/python/3.6.1/python-3.6.1.exe -OutFile C:/install/python-3.6.1.exe;
Start-Process C:\install\python-3.6.1.exe -ArgumentList '/quiet InstallAllUsers=1 TargetDir=C:\\python' -Wait;
Invoke-WebRequest https://netcologne.dl.sourceforge.net/project/pywin32/pywin32/Build%20221/pywin32-221.win32-py3.6.exe -OutFile C:/install/pywin32-221.win32-py3.6.exe;
Start-Process c:\python\Scripts\easy_install-3.6.exe -ArgumentList 'C:\install\pywin32-221.win32-py3.6.exe' -Wait;
$path = $env:path + ';C:\python';
Set-ItemProperty -Path 'HKLM:\SYSTEM\CurrentControlSet\Control\Session Manager\Environment\' -Name Path -Value $path;
@DavidHamburg
DavidHamburg / CMakeLists.txt
Last active July 24, 2018 14:46
cmake c++/cli
cmake_minimum_required(VERSION 3.5)
project(myproject)
set(SOURCE_FILES src/main.cpp)
add_executable(myproject ${SOURCE_FILES})
set_target_properties(${PROJECT_NAME} PROPERTIES VS_DOTNET_TARGET_FRAMEWORK_VERSION "v4.6")
set_target_properties(${PROJECT_NAME} PROPERTIES VS_DOTNET_REFERENCES "System")
set_target_properties(${PROJECT_NAME} PROPERTIES COMPILE_FLAGS "/clr /EHa")
string(REGEX REPLACE "/RTC(su|[1su])" "" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
string(REGEX REPLACE "/RTC(su|[1su])" "" CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG}")
@DavidHamburg
DavidHamburg / Dockerfile
Created May 9, 2017 22:11
firefox docker container
#sudo docker run -ti --rm -e DISPLAY -v /tmp/.X11-unix:/tmp/.X11-unix -v $HOME/.Xauthority:/home/developer/.Xauthority --net=host --pid=host --ipc=host firefox
#sudo docker build -t firefox .
FROM ubuntu:16.04
RUN apt-get update && apt-get upgrade -y && apt-get install -y sudo software-properties-common python-software-properties
RUN apt-add-repository multiverse
RUN apt-get update && apt-get install -y ubuntu-restricted-addons ubuntu-restricted-extras libavcodec-extra firefox && rm -rf /var/cache/apt/
RUN export uid=1000 gid=1000 && \

Keybase proof

I hereby claim:

  • I am davidhamburg on github.
  • I am davidnerjes (https://keybase.io/davidnerjes) on keybase.
  • I have a public key whose fingerprint is EE89 77CB E6A4 60B0 1580 C63F 6404 08BF DE60 CAE1

To claim this, I am signing this object: