Skip to content

Instantly share code, notes, and snippets.

View TrickShotMLG02's full-sized avatar
⛏️
Currently mining bugs, send coffee

TrickShotMLG TrickShotMLG02

⛏️
Currently mining bugs, send coffee
  • Saarbrücken, Germany
View GitHub Profile
@TrickShotMLG02
TrickShotMLG02 / git_newrepo
Last active May 24, 2024 08:16 — forked from c0ldlimit/git_newrepo
Git: Push a new or existing repo to Github
# Create a new repository on the command line
touch README.md
git init
git add README.md
git commit -m "first commit"
git remote add origin https://github.com/TrickShotMLG02/newrepo.git
git push -u origin master
# Push an existing repository from the command line
@TrickShotMLG02
TrickShotMLG02 / remove-rubber-band-web-apps-ios
Created May 8, 2024 17:47 — forked from amolk/remove-rubber-band-web-apps-ios
Remove rubberband scrolling from web apps on mobile safari (iOS)
<!DOCTYPE html>
<html>
<head>
<title>Remove rubberband scrolling from web apps on mobile safari (iOS)</title>
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-touch-fullscreen" content="yes">
<meta id="extViewportMeta" name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=no">
<script type="text/javascript" src="http://code.jquery.com/jquery-1.6.4.min.js"></script>
<style>
html, body {margin: 0; padding: 0; overflow: hidden}
@TrickShotMLG02
TrickShotMLG02 / gist:325d6cb81b1d2e61d48b2c0db772f177
Created September 25, 2023 19:25
Count lines of code per author in git repo
git ls-files | xargs -n1 git blame --line-porcelain | sed -n 's/^author //p' | sort -f | uniq -ic | sort -nr
@TrickShotMLG02
TrickShotMLG02 / gist:08b231e809a2fe6de0ba07f84d02ab40
Last active May 25, 2024 13:33
dokka (kotlin) setup build.gradle.kts for private, protected and public fields/methods
plugins {
id("org.jetbrains.dokka").version("1.9.0")
}
tasks.withType<DokkaTask>().configureEach {
dokkaSourceSets {
configureEach {
moduleName = "Saarvive and Thrive"
documentedVisibilities.set(
setOf(
@TrickShotMLG02
TrickShotMLG02 / RLE_array.c
Created August 5, 2023 18:56
run length encoding of an array in a detailed way and some shortened versions
#include <stdio.h>
void printArray(int* array, int len) {
for(int i = 0; i < len; i++)
printf("%d ", array[i]);
printf("\n");
}
int rle(int* arr, int len) {
int cur = 0;