Skip to content

Instantly share code, notes, and snippets.

<!DOCTYPE html>
<html>
<head>
<title>Example App</title>
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
<style>
table, th, td {
@rmi1974
rmi1974 / git_annex_useful_commands.md
Last active December 15, 2023 14:15
Git-annex useful commands #git #git-annex #commandlinefu

Git-annex useful commands

[git-annex][1]

git-annex allows managing files with git, without checking the file contents into git. While that may seem paradoxical, it is useful when dealing with files larger than git can currently easily handle, whether due to limitations in memory, time, or disk space.

Getting content

Get all content from backup remote:

@jthuraisamy
jthuraisamy / highlight_calls.py
Created April 4, 2018 01:39
IDAPython Script to highlight function calls.
"""
IDAPython Script to highlight function calls.
Re-implemented by jthuraisamy (not the original author).
Install to %IDADIR%\plugins\highlight_calls.py.
Run by pressing Ctrl+Alt+H or go to Options -> Highlight Call Instructions.
"""
class HighlightHandler(idaapi.action_handler_t):
@petitviolet
petitviolet / nginx_deployment.yaml
Created March 11, 2018 11:04
sample Nginx configuration on Kubernetes using ConfigMap to configure nginx.
apiVersion: v1
kind: ConfigMap
metadata:
name: nginx-conf
data:
nginx.conf: |
user nginx;
worker_processes 3;
error_log /var/log/nginx/error.log;
events {

Demo:

Spoiler warning

Spoiler text. Note that it's important to have a space after the summary tag. You should be able to write any markdown you want inside the <details> tag... just make sure you close <details> afterward.

console.log("I'm a code block!");
@telamon
telamon / init.vim
Created August 16, 2017 13:25
My amazing Neovim configuration.
" Tony's Settings
" Usage:
" Download and install nvim, then install 'dein' the vim-package manager.
" During installation of dein it will output a sample configuration, take the
" two lines that `set runtimepath=PATH` and `dein#begin(PATH)` and replace the
" ones in this file online 14 and 17. Restart nvim and Happy Vimming!
"dein Scripts-----------------------------
if &compatible
set nocompatible " Be iMproved
@cmendible
cmendible / Roslyn.CodeGeneration.Program.cs
Created August 16, 2017 09:30
Create a class with dotnet core and roslyn with using statements outside the namespace
using System;
using Microsoft.CodeAnalysis;
using Microsoft.CodeAnalysis.CSharp;
using Microsoft.CodeAnalysis.CSharp.Syntax;
namespace Roslyn.CodeGeneration
{
public class Program
{
public static void Main(string[] args)
@rgl
rgl / Remove-VirtualBoxHostOnlyNetworkInterfaces.ps1
Created October 22, 2016 23:21
Remove all VirtualBox Host-Only network interfaces (Windows)
# NB this depends on devcon. you must install it from chocolatey with choco install -y devcon.portable
$devcon = "$ENV:ProgramData\Chocolatey\Lib\devcon.portable\Devcon$(if ($ENV:PROCESSOR_ARCHITECTURE -like '*64') {'64'} else {'32'}).exe"
Get-NetAdapter `
| Where-Object {$_.Virtual} `
| Where-Object {$_.DriverFileName -like 'VBox*.sys'} `
| ForEach-Object {
Write-Host "Removing the $($_.InterfaceAlias) interface..."
$result = &$devcon remove "@$($_.PnPDeviceID)"
@lukechilds
lukechilds / get_latest_release.sh
Created August 9, 2016 19:43
Shell - Get latest release from GitHub
get_latest_release() {
curl --silent "https://api.github.com/repos/$1/releases/latest" | # Get latest release from GitHub api
grep '"tag_name":' | # Get tag line
sed -E 's/.*"([^"]+)".*/\1/' # Pluck JSON value
}
# Usage
# $ get_latest_release "creationix/nvm"
# v0.31.4
@jrolstad
jrolstad / gist:5ca7d78dbfe182d7c1be
Last active December 16, 2023 06:55
List all NodaTime Timezones
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using NodaTime.TimeZones;
using NUnit.Framework;
namespace what_time_is_it
{