Skip to content

Instantly share code, notes, and snippets.

View chefe's full-sized avatar
💻
Coding

chefe chefe

💻
Coding
View GitHub Profile
@chefe
chefe / gh-pandoc-LICENSE.md
Created June 6, 2019 10:04 — forked from forivall/gh-pandoc-LICENSE.md
Github-style css for pandoc

The MIT License (MIT)

Copyright (c) 2016-2017 Emily M Klassen

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

#!/bin/sh
sudo mount -t davfs https://elearning.hslu.ch/ilias/webdav.php/hslu/ /mnt/ilias

Keybase proof

I hereby claim:

  • I am chefe on github.
  • I am chefe (https://keybase.io/chefe) on keybase.
  • I have a public key whose fingerprint is 6B11 2D81 7CE5 2170 A822 50CE D019 0964 8835 7503

To claim this, I am signing this object:

# The two commands remove ALL apps, including the store
# Get-AppxPackage | Remove-AppxPackage
# Get-AppxPackage -AllUsers | Remove-AppxPackage
#
Get-AppxPackage Microsoft.XboxGameCallableUI | Remove-AppxPackage
Get-AppxPackage Windows.ContactSupport | Remove-AppxPackage
Get-AppxPackage Microsoft.Messaging | Remove-AppxPackage
Get-AppxPackage Microsoft.OneConnect | Remove-AppxPackage
@chefe
chefe / FolderSync.bat
Last active August 29, 2015 14:27
Sync all files and subfolders from a folder to another
xcopy "C:\Source\Folder" "D:\Destination\Folder" /s /e /i /h /Y
@chefe
chefe / post-receive
Created June 3, 2014 10:55
post-receive hook for generating a webpage
#!/bin/bash
while read oldrev newrev ref
do
branch=`echo $ref | cut -d/ -f3`
git archive --format=tar --prefix=$branch/ $branch | (cd ../web && tar xf -)
echo "The page for $branch was successfully updated"
done
@chefe
chefe / Makefile
Last active August 29, 2015 14:01
Sample make file for cpp
# Setup make variables
CC=g++
CFLAGS=-c -Wall -g -Iinc
LDFLAGS=
SOURCEDIR=src/
OBJECTDIR=obj/
BINDIR=bin/
SOURCES=main.cpp
OBJECTS=$(SOURCES:.cpp=.o)
EXECUTABLE=main
@chefe
chefe / leadingZeroInt
Created February 5, 2014 12:01
Format a integer value with a leading zero if it is smaller than 10
/**
* Format a integer with a leading zero if the values is smaller then 10
* @param int inputInt a integer value
*/
function leadingZeroInt(inputInt) {
return (inputInt < 10 ? '0' + inputInt : '' + inputInt)
}
@chefe
chefe / dateFormat
Created February 5, 2014 12:00
Format a javascript date as a string, based on a format string
/**
* Format date as a string
* @param Date date a date object (usually "new Date();")
* @param string format a string format, eg. "DD-MM-YYYY"
*/
function dateFormat(date, format) {
// Calculate date parts and replace instances in format string accordingly
// Hint: Months are zero-based
// Date
@chefe
chefe / Shell-OS-Checker
Created January 27, 2014 15:52
Do something in a shell script based on the os type
if [ "$(uname)" == "Darwin" ]; then
# Do something under Mac OS X platform
elif [ "$(expr substr $(uname -s) 1 5)" == "Linux" ]; then
# Do something under Linux platform
elif [ "$(expr substr $(uname -s) 1 10)" == "MINGW32_NT" ]; then
# Do something under Windows NT platform
fi