Skip to content

Instantly share code, notes, and snippets.

View RagedUnicorn's full-sized avatar

Raged Unicorn RagedUnicorn

View GitHub Profile
@RagedUnicorn
RagedUnicorn / git_delete_remote_branch.sh
Created December 29, 2018 17:27
Example for deleting a remote branch in Git
// delete a remote branch on github
git push origin :[branchname]
@RagedUnicorn
RagedUnicorn / unpack_tar.gz.sh
Created December 29, 2018 17:25
Example for unpackaging a tar.gz archive
# unpack a tar.gz archive
# params:
# x = extract files from tar archive
# z = decompress the archive with gzip
# f = path to the file that should get unpacked
tar -xzf archiv.tar.gz
@RagedUnicorn
RagedUnicorn / pack_tar.gz.sh
Created December 29, 2018 17:24
Example for packaging a new tar.gz archive
# create a new tar.gz archive
# params:
# c = create a new tar archive
# z = gzip the created tar archive
# f = path to the archive that should get created
tar -czf archive.tar.gz folder1 folder2
@RagedUnicorn
RagedUnicorn / string_concatenate.c
Created December 29, 2018 17:21
Safe concatenating of strings in C
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
void safeConcatenate(char *buffer, int size, char *string1, char *string2);
int main(int argc, char *argv[]) {
char buffer[1024] = {0};
char *string1 = "foo";
char *string2 = "bar";
@RagedUnicorn
RagedUnicorn / win_disable_sop.bat
Created December 29, 2018 17:19
Disable same origin policy for chrome on Windows
@echo off
%userprofile%\AppData\Local\Google\Chrome\Application\chrome.exe --disable-web-security
exit
@RagedUnicorn
RagedUnicorn / start_new_user_profile.sh
Created December 29, 2018 17:18
Start chrome with specific user-data-dir
#!/bin/sh
# Start chrome with a new user profile the directory musst be changed or cleaned each time
/Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome --user-data-dir=<some path>
@RagedUnicorn
RagedUnicorn / mac_disable_sop.sh
Last active December 29, 2018 17:19
Disable same origin policy for chrome on Mac
#!/bin/sh
# Open chrome with disabled web security allowing breaking of sop-rule
/Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome --disable-web-security
@RagedUnicorn
RagedUnicorn / terraform_debug.md
Created November 25, 2018 18:48
Enable logs for terraform

Terraform Debug

In the console you are using set the environment variable TF_LOG

export TF_LOG=DEBUG

Values: TRACE, DEBUG, INFO, WARN, ERROR

@RagedUnicorn
RagedUnicorn / ossrh_ragedunicorn_urls.md
Last active September 10, 2018 20:23
Maven central deployment urls

Snapshot Artifacts

https://oss.sonatype.org/content/repositories/snapshots

Release Artifacts

https://oss.sonatype.org/service/local/staging/deploy/maven2
@RagedUnicorn
RagedUnicorn / base_maven_settings.xml
Created September 9, 2018 19:06
Basic settings.xml for Maven
<?xml version="1.0" encoding="UTF-8"?>
<!--
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at