Skip to content

Instantly share code, notes, and snippets.

View liuerfire's full-sized avatar
🐈

liuerfire liuerfire

🐈
View GitHub Profile
highlight clear
let g:colors_name = 'liuerfire'
let s:background = &background
if &background ==# 'dark'
let s:blue = #{gui: '#a3a3eb', cterm: 147}
let s:orange = #{gui: '#d7af87', cterm: 180}
let s:red = #{gui: '#d78787', cterm: 174}
let s:teal = #{gui: '#5fd7af', cterm: 79 }
let s:yellow = #{gui: '#d7d787', cterm: 186}
@liuerfire
liuerfire / infinite-zoom.patch
Created July 6, 2023 09:10
infinite-zoom.patch
diff --git a/scripts/infinite-zoom.py b/scripts/infinite-zoom.py
index 60751b0..35cdc78 100644
--- a/scripts/infinite-zoom.py
+++ b/scripts/infinite-zoom.py
@@ -1,5 +1,89 @@
+import base64
+import io
+import random
+
+import gradio as gr
{
prometheusAlerts+:: {
groups+: [
{
name: 'node-exporter',
rules: [
{
alert: 'HostOutOfMemory',
expr: 'node_memory_MemAvailable_bytes / node_memory_MemTotal_bytes * 100 < 10',
'for': '2m',
# -*- mode: ruby -*-
# vi: set ft=ruby :
# All Vagrant configuration is done below. The "2" in Vagrant.configure
# configures the configuration version (we support older styles for
# backwards compatibility). Please don't change it unless you know what
# you're doing.
Vagrant.configure("2") do |config|
# The most common configuration options are documented and commented below.
# For a complete reference, please see the online documentation at
Computer Information:
Manufacturer: Apple
Model: MacBookPro11,3
Form Factor: Laptop
No Touch Input Detected
Processor Information:
CPU Vendor: GenuineIntel
CPU Brand: Intel(R) Core(TM) i7-4870HQ CPU @ 2.50GHz
CPU Family: 0x6
[ResourceSystem] CResourceSystem Init
[RenderSystem] Loaded video settings config from 'cfg/video.txt'
[RenderSystem] Unable to open GL shader cache TOC /Users/liuerfire/Library/Application Support/Steam/steamapps/common/dota 2 beta/game/dota/shadercache/gl/shaders.toc file - might not exist yet.
failed to dlopen /Users/liuerfire/Library/Application Support/Steam/steamapps/common/dota 2 beta/game/bin/osx64/dota2.app/Contents/MacOS/librenderdoc.dylib error=dlopen(/Users/liuerfire/Library/Application Support/Steam/steamapps/common/dota 2 beta/game/bin/osx64/dota2.app/Contents/MacOS/librenderdoc.dylib, 9): image not found
failed to dlopen librenderdoc.dylib error=dlopen(librenderdoc.dylib, 9): image not found
ERROR: HangWatchdogInternal_BeginScope() - Hang watchdog not implemented for this platform!
ERROR: HangWatchdogInternal_EndScope() - Hang watchdog not implemented for this platform!
[Filesystem] ---------------
[Filesystem] Path ID: File Path:
[Filesystem] ADDONS "/Users/liuerfir
@liuerfire
liuerfire / midpoint.cpp
Created December 24, 2012 12:07
bresenham's midpoint line algorithm
#include <GL/glut.h>
void init()
{
glClearColor(0.0, 0.0, 0.0, 0.0);
glMatrixMode(GL_PROJECTION);
glLoadIdentity();
gluOrtho2D(0.0, 500.0, 0.0, 500.0);
}
@liuerfire
liuerfire / dda.cpp
Created December 2, 2012 19:41
generate a line with DDA algorithm
#include <GL/glut.h>
#include <GL/glu.h>
#include <cmath>
void init()
{
glClearColor(0.0, 0.0, 0.0, 0.0);
glMatrixMode(GL_PROJECTION);
glLoadIdentity();
gluOrtho2D(0.0, 500.0, 0.0, 500.0);