This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Use Ubuntu as the base image | |
FROM ubuntu:23.04 | |
# Update package lists and install necessary dependencies | |
RUN apt-get update && \ | |
apt-get install -y \ | |
build-essential \ | |
libgstreamer1.0-dev \ | |
meson \ | |
flex \ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Use Ubuntu as the base image | |
FROM ubuntu:23.04 | |
# Update package lists and install necessary dependencies | |
RUN apt-get update && \ | |
apt-get install -y \ | |
build-essential \ | |
libgstreamer1.0-dev \ | |
meson \ | |
ninja-build \ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pfd() { | |
local windir="$(pwsh.exe -NoProfile -NonInteractive -NoLogo -ExecutionPolicy Bypass -Command - <<"EOF" | |
$Win32API = Add-Type -Name Funcs -Namespace Win32 -PassThru -MemberDefinition @' | |
[DllImport("user32.dll", SetLastError = true)] | |
public static extern IntPtr FindWindow(string lpClassName, IntPtr lpWindowName); | |
'@ | |
$topmostHwnd = $Win32API::FindWindow('CabinetWClass', [IntPtr]::Zero) | |
$topmostWindow = (New-Object -COM 'Shell.Application').Windows() | Where-Object {$_.HWND -eq $topmostHwnd} | |
$topmostWindow.Document.Folder.Self.IsFileSystem ? $topmostWindow.Document.Folder.Self.Path : $null |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python2 | |
import argparse | |
import sys | |
import subprocess | |
from itertools import takewhile | |
from macholib import MachO, ptypes | |
def parse_rwx(text): | |
return ('r' in text and 1) | ('w' in text and 2) | ('x' in text and 4) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
####################################### | |
# Modes | |
###################################### | |
:: default : yabai -m config active_window_border_color 0xffffffff | |
:: resize : yabai -m config active_window_border_color 0x99ff0000 | |
# Navigating windows | |
rshift + rcmd + rctrl + ralt - h : yabai -m window --focus west | |
rshift + rcmd + rctrl + ralt - j : yabai -m window --focus south |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const getRandomNumber = (min, max) => Math.random() * (max - min) + min; | |
const KeyCode = function(code, shift) { | |
this.code = code; | |
this.shift = shift; | |
}; | |
const ENTER = new KeyCode(36); | |
const TAB = new KeyCode(48); | |
const SHIFT_TAB = new KeyCode(48, true); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#[macro_use] | |
extern crate detour; | |
extern crate winapi; | |
// --- std --- | |
use std::mem; | |
use std::ffi::CString; | |
// --- external --- | |
use kernel32::{GetModuleHandleW, GetProcAddress}; | |
use winapi::{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module.exports = function(api) { | |
api.cache(true); | |
return { | |
presets: ['babel-preset-expo', 'module:react-native-dotenv'], | |
}; | |
}; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import R from 'ramda'; | |
import attractions from '../assets/attractions.json'; | |
export default new Set(R.chain(R.prop('categories'), attractions)); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
u32 rle_decompress(u8** out, const u8* src) { | |
// Extract the size of the data | |
u32 originalSize = *((u32*) src) >> 8; | |
u8* originalDst = calloc(originalSize, 1); | |
// Advance past the header | |
src += sizeof(u32); | |
u8* dst = originalDst; | |
for(u32 size = originalSize; size > 0;) { |
NewerOlder