Skip to content

Instantly share code, notes, and snippets.

View dunn's full-sized avatar
💭
no

Alexandra Catalina dunn

💭
no
View GitHub Profile
@tmalsburg
tmalsburg / insert_bibtex_from_doi.el
Last active April 16, 2024 09:27
An Emacs command that takes the DOI in the clipboard and inserts the corresponding BibTeX entry at point.
(require 'url-http)
(defun insert-bibtex-from-doi ()
(interactive)
(let* ((doi (string-trim (gui-get-primary-selection)))
(url (if (string-prefix-p "https://doi.org/" doi)
doi
(concat "https://doi.org/" doi)))
(url-request-method "GET")
(url-mime-accept-string "application/x-bibtex"))
@Panakotta00
Panakotta00 / Unreal Engine - Diff-Merge-Tool Setup.adoc
Last active November 10, 2023 05:52
Use the Unreal Editor as Git Diff/Merge Tool

Unreal Engine Asset Diff/Merge-Tool with Git!

Since unreal engines assets are binary encoded classical text based git diff/merge tools will give up on merge conflicts of unreal assets. But fear not! You can setup your git environment to actually be able to diff/merge these .uasset files by using already built-in functionallity of the unreal editor!

Creating the PowerShell-Script

First of all do we have to create a small PowerShell-Script that copies the diff files into temporary files and to convert relative paths to absolute ones.

#!/bin/sh
# usage:
# $ export GITHUB_TOKEN=[token]
# $ rename-master-to-main.sh [org] [repo]
# generate GITHUB_TOKEN at https://github.com/settings/tokens/new with "repo" privileges
ORG="$1"
REPO="$2"
rm -rf $REPO
@ibuildthecloud
ibuildthecloud / README.md
Last active April 2, 2024 19:02
k3s on WSL2

Instructions to hack up WSL2 on Windows 10 Build 18917 to run k3s (Kubernetes) and rio

Install WSL2

https://docs.microsoft.com/en-us/windows/wsl/wsl2-install

I already had Ubuntu-18.04 installed in wsl 1. So I just did wsl --set-version Ubuntu-18.04 2

Compile Kernel

Using Ubuntu 18.04 (I'm sure any distro will work), inside WSL2 download https://thirdpartysource.microsoft.com/download/Windows%20Subsystem%20for%20Linux%20v2/May%202019/WSLv2-Linux-Kernel-master.zip and extract to a folder. The latest version of the kernel source is available at (https://github.com/microsoft/WSL2-Linux-Kernel)

Nginx.conf
worker_processes auto;
events {
worker_connections 1024;
}
## HLS server streaming
rtmp {
@johnholdun
johnholdun / mastodon-parser.rb
Created April 19, 2017 16:20
Turn a Mastodon permalink URL into a one-line plain text status
require 'nokogiri'
require 'open-uri'
require 'upmark'
require 'cgi'
require 'uri'
class TootReader
ACTIVITY_NAMESPACE = 'http://activitystrea.ms/spec/1.0/'.freeze
COMMENT_TYPE = 'http://activitystrea.ms/schema/1.0/comment'.freeze
@ceejbot
ceejbot / README.md
Last active December 2, 2020 07:06
How I set up a mastodon instance on AWS with ansible on ubuntu trusty
@myshov
myshov / function_invocation.js
Last active January 21, 2024 15:14
11 Ways to Invoke a Function
console.log(1);
(_ => console.log(2))();
eval('console.log(3);');
console.log.call(null, 4);
console.log.apply(null, [5]);
new Function('console.log(6)')();
Reflect.apply(console.log, null, [7])
Reflect.construct(function(){console.log(8)}, []);
Function.prototype.apply.call(console.log, null, [9]);
Function.prototype.call.call(console.log, null, 10);
@zwaldowski
zwaldowski / safari-inline-video.sh
Last active December 10, 2020 07:31
Safari Inline Video
defaults write com.apple.Safari WebKitMediaPlaybackAllowsInline -bool false
defaults write com.apple.SafariTechnologyPreview WebKitMediaPlaybackAllowsInline -bool false
defaults write com.apple.Safari com.apple.Safari.ContentPageGroupIdentifier.WebKit2AllowsInlineMediaPlayback -bool false
defaults write com.apple.SafariTechnologyPreview com.apple.Safari.ContentPageGroupIdentifier.WebKit2AllowsInlineMediaPlayback -bool false
@zmwangx
zmwangx / multipoet
Last active May 9, 2017 21:13
homebrew-pypi-poet wrapper for handling multiple dependencies of non-PyPI software
#!/usr/bin/env zsh
# homebrew-pypi-poet for multiple packages.
#
# Usage:
#
# multipoet dep [dep ...]
#
# Example:
#