Skip to content

Instantly share code, notes, and snippets.

@Mic92
Mic92 / ubuntu-sleep.yaml
Created January 20, 2022 14:51 — forked from tcdowney/ubuntu-sleep.yaml
Ubuntu Sleep Pod
View ubuntu-sleep.yaml
apiVersion: v1
kind: Pod
metadata:
name: ubuntu
labels:
app: ubuntu
spec:
containers:
- image: ubuntu
command:
@Mic92
Mic92 / flake.nix
Last active July 30, 2020 15:56 — forked from Slabity/flake.nix
View flake.nix
{
description = "Simple overlay flake";
inputs.nixpkgs.url = "nixpkgs/release-20.03";
outputs = inputs@{ self, nixpkgs }: {
apps.wine.x86_64-linux = nixpkgs.legacyPackages.x86_64-linux.wine.override ({
wineRelease = "staging";
wineBuild = "wineWow";
});
@Mic92
Mic92 / shell.nix
Created March 25, 2018 09:03 — forked from abbradar/shell.nix
Nix FHS env for OpenWrt
View shell.nix
{ pkgs ? import <nixpkgs> {} }:
let
fixWrapper = pkgs.runCommand "fix-wrapper" {} ''
mkdir -p $out/bin
for i in ${pkgs.gcc.cc}/bin/*-gnu-gcc*; do
ln -s ${pkgs.gcc}/bin/gcc $out/bin/$(basename "$i")
done
for i in ${pkgs.gcc.cc}/bin/*-gnu-{g++,c++}*; do
ln -s ${pkgs.gcc}/bin/g++ $out/bin/$(basename "$i")
@Mic92
Mic92 / borrow-mac
Last active August 17, 2017 22:04 — forked from anonymous/borrow-mac
View borrow-mac
#!/usr/bin/env ruby
def assert_command_exists(cmd)
ENV['PATH'].split(File::PATH_SEPARATOR).each do |path|
exe = File.join(path, cmd)
return exe if File.executable?(exe) && File.file?(exe)
end
abort "#{cmd} not found"
end
@Mic92
Mic92 / default.nix
Created September 26, 2016 16:12 — forked from nico202/default.nix
gazebo-yarp-plugins
View default.nix
{ stdenv, fetchFromGitHub, cmake, pkgconfig
, ogre, ignition, tinyxml, gazeboSimulator
, freeimage, tbb, yarp
}:
stdenv.mkDerivation rec {
name = "gazebo-yarp-plugins-${version}";
version = "0.1.2";
src = fetchFromGitHub {
@Mic92
Mic92 / collectmail.rb
Last active June 26, 2018 02:12 — forked from ringe/file1.rb
Extract display name and email addresses from Maildir
View collectmail.rb
# fork of https://gist.github.com/ringe/2593827
# added the following features:
# - filter common social networks
# - only included email if it was found at least 2 times
# - extract display name
# - write to tab seperated file
require 'mail' # uses the mail gem => gem install mail
def sanitize_display_name(name)
name.gsub!(/["']/, "")
@Mic92
Mic92 / test.rc
Last active December 17, 2015 06:18 — forked from anonymous/test.rc
View test.rc
use core::io::{BytesReader, BytesWriter};
pub struct MockSocket {
recv: BytesReader,
send: BytesWriter
}
// Compile error
//test.rc:4:10: 4:21 error: Illegal anonymous lifetime: anonymous lifetimes are not permitted here
//test.rc:4 recv: BytesReader,
View rbenv.sh
# rbenv setup
export RBENV_ROOT=/usr/local/rbenv
export PATH="$RBENV_ROOT/bin:$PATH"
eval "$(rbenv init -)"
View 0001-command-allow-to-omit-END-in-ranges-START-END.patch
From 4437f3f80c3d168b626cd9ae1666aaef0ff378b5 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= <joerg@higgsboson.tk>
Date: Mon, 18 Feb 2013 22:57:39 +0100
Subject: [PATCH] command: allow to omit END in ranges (START:END)
If END is omitted, mpd should use the highest possible value instead of raising an error.
This partially reverts 52e9cab1c1743f64a7
---
src/protocol/ArgParser.cxx | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)