List of helpful shortcuts for faster coding
If you have any other helpful shortcuts, feel free to add in the comments of this gist :)
def decorate(func): | |
print("Do something before func()") | |
func() | |
return func #return the original function, unmodified | |
@decorate | |
def hello(): | |
print("Hello, world!") |
# ~/.config/starship.toml | |
[battery] | |
full_symbol = "🔋" | |
charging_symbol = "🔌" | |
discharging_symbol = "⚡" | |
[[battery.display]] | |
threshold = 30 | |
style = "bold red" |
You can now read this on my (pretty) website! Check it out here.
Every reason to get more HackerPoints™ is a good one, so today we're going to
write a neat command line app in .NET Core! The Common library has a really cool
package Microsoft.Extensions.CommandlineUtils
to help us parse command line
arguments and structure our app, but sadly it's undocumented.
No more! In this guide, we'll explore the package and write a really neat
#!/bin/bash | |
##################################################### | |
# Name: Bash CheatSheet for Mac OSX | |
# | |
# A little overlook of the Bash basics | |
# | |
# Usage: | |
# | |
# Author: J. Le Coupanec | |
# Date: 2014/11/04 |
" Don't try to be vi compatible | |
set nocompatible | |
" Helps force plugins to load correctly when it is turned back on below | |
filetype off | |
" TODO: Load plugins here (pathogen or vundle) | |
" Turn on syntax highlighting | |
syntax on |
using System.Linq.Expressions; | |
/// <summary> | |
/// Returns the name of the specified property of the specified type. | |
/// </summary> | |
/// <typeparam name="T">The type the property is a member of.</typeparam> | |
/// <param name="property">The property expression.</param> | |
/// <returns>The property name.</returns> | |
public static string GetPropertyName<T>(Expression<Func<T, object>> property) | |
{ |