Skip to content

Instantly share code, notes, and snippets.

View ondrasek's full-sized avatar
💭
I may be slow to respond, but I respond nonetheless.

Ondrej Krajicek ondrasek

💭
I may be slow to respond, but I respond nonetheless.
View GitHub Profile
@ondrasek
ondrasek / lima-desktop.10s.sh
Created July 7, 2023 07:43
xbar lima desktop
#!/usr/bin/env zsh
# <xbar.title>lima docker vm status</xbar.title>
# <xbar.version>v1.0</xbar.version>
# <xbar.author>Ondrej Krajicek</xbar.author>
# <xbar.author.github>ondrasek</xbar.author.github>
# <xbar.desc>Shows lima docker VM status and CPU usage, with the option to start or stop it.</xbar.desc>
# <xbar.image></xbar.image>
# !xbar.dependencies>zsh</xbar.dependencies>
using System;
using System.Collections.Generic;
using System.Linq;
namespace linq_select
{
public class Holder
{
public object arg1 { get; set; }
public object arg2 { get; set; }
@ondrasek
ondrasek / spawn-interactive-process.c
Last active September 23, 2022 07:23
spawn-interactive-process: How to launch a process from a Windows Service running in interactive user session(s)
// spawn-interactive-process.cpp : Defines the entry point for the console application.
// Do not forget to link against wtsapi32.lib
// How to test this: use psexec from SysInternals, such as ```psexec -s c:\windows\system32\cmd.exe```
// to run CMD under NT AUTHORITY\SYSTEM account (you can confirm this by running whoami) and then
// run spawn-interactive-process (feel free to disable waiting for debugger). The result is a notepad process
// running under interactive user credentials and on the interactive desktop launched from a service running under
// system account.
#include <stdio.h>
#include <tchar.h>

Keybase proof

I hereby claim:

  • I am ondrasek on github.
  • I am ondra (https://keybase.io/ondra) on keybase.
  • I have a public key ASC--isxIdNC9mOg22_1fcixGCGRpXdC-r_Vf0oOTIcNDwo

To claim this, I am signing this object:

@ondrasek
ondrasek / OmniFocus-OpenInEvernote.scpt
Created July 5, 2013 21:57
A simple AppleScript script to create tags for OmniFocus tasks / projects in Evernote. Simply select any task (I am using this for groups) in OmniFocus and execute the script. It will create a tag based on the task name (the tag name needs to be specified in square brackets), put the tag under its parent project tag (created for OmniFocus parent…
-----------------------------------------------------------------------------------------------------------------
--
-- Simple script to create tag for OmniFocus group (and its project). Tag names are to be specified
-- in square brackets.
--
-- Copyright © Ondrej Krajicek, [email protected]
-- version 0.1
--
-- Public domain. If you find this useful, please mention my contribution.
--
@ondrasek
ondrasek / .vimrc
Created May 26, 2013 10:19
My .vimrc / _vimrc configuration file.
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
""
"" Ondruv megazazracnysuperhyperultrasuprafreecoolinkonfigurag
""
"" Copyright (c) Ondra
""
"" Tento konfigurak byl zplagiatorovan Gaussem
""
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""