Skip to content

Instantly share code, notes, and snippets.

View halida's full-sized avatar

Halida halida

View GitHub Profile
@halida
halida / error.txt
Created January 11, 2024 04:11
Azure Sheep: Part One EXTENDED error at as_c2map03 end
$ $HOME/.steam/bin/steam-runtime/run.sh /home/halida/.local/share/Steam/steamapps/common/Black\ Mesa/bms.sh -game asheep +workshop_disable 1
SDL video target is 'x11'
SDL video target is 'x11'
This system supports the OpenGL extension GL_EXT_framebuffer_object.
This system supports the OpenGL extension GL_EXT_framebuffer_blit.
This system supports the OpenGL extension GL_EXT_framebuffer_multisample.
This system DOES NOT support the OpenGL extension GL_APPLE_fence.
This system supports the OpenGL extension GL_NV_fence.
This system supports the OpenGL extension GL_ARB_sync.
This system supports the OpenGL extension GL_EXT_draw_buffers2.
@halida
halida / content.html
Created September 10, 2021 01:56
USA: The end is approaching
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8"/>
<title></title>
<meta name="generator" content="LibreOffice 6.4.7.2 (Linux)"/>
<meta name="created" content="2021-09-10T09:54:14.330969953"/>
<meta name="changed" content="2021-09-10T09:54:36.089214124"/>
<style type="text/css">
@page { size: 21cm 29.7cm; margin: 2cm }
@halida
halida / backup_laptop.sh
Created March 27, 2021 05:26
backup_laptop.sh
#!/bin/sh
# Setting this, so the repo does not need to be given on the commandline:
export BORG_REPO=username@server:/mnt/main/resource/username/backup_store/borg_laptop
# check:
# borg list
# See the section "Passphrase notes" for more infos.
@halida
halida / main.cs
Last active March 22, 2020 00:49
union type for exception
// File API
get_file(string filename) -> (File | NotFoundException) { ... }
close_file(File file) -> void { ... }
read_file(File file) -> (string | IOFoundException) { ... }
// File helper
<T>with_file(filename, Func<file, T> func) -> (T | NotFoundException) {
var file = get_file(filename);
if (file is NotFoundException) { return result; }
@halida
halida / fiber.rb
Last active January 23, 2020 13:18
work fiber
def example
# original code
def work(item)
check?(item)
result = http_post("server/calculate", item.id)
item.update_attributes(result: result)
end
items.map{|item| work(item)}
# support async now
今天我把母亲赶出了家门
updated on Tue May 30, 2017 22:00 by 扬帆远航 via 一个哲学家的财务自由之路
Translate article
就在今天上午,我把母亲赶出了家门,我感到如释重负,因为我已经忍受了这么多年,觉得自己实在不该再忍了,就做出了这样的决定。
我这里把前因后果谈一谈,其最初的缘由,我已经在另一篇文章《我家是如何从富裕走向赤贫的》做过叙述,这里主要讲近几年发生的事情。
@halida
halida / rails_haterslist.conf
Created June 1, 2017 13:33
Manage rails process by systemd
# copy from https://github.com/macournoyer/thin/pull/184#issuecomment-191119259
[Unit]
Description=haterslist
After=syslog.target network.target
[Service]
Type=forking
User=production
Group=production
@halida
halida / auto_reply_holiday.js
Last active January 24, 2017 06:53
gmail auto reply schedule
function autoReply() {
var scheduled_date = [
'2016-12-19', '2016-12-20',
];
var auto_reply = "I am out of office. Your email will not seen until Monday morning.";
var now = new Date();
var today = now.toISOString().slice(0, 10); // today format: '2017-01-01'
var label = GmailApp.getUserLabelByName('auto-replyed') || GmailApp.createLabel('auto-replyed');
@halida
halida / covert.rb
Created March 6, 2015 06:41
Create GIF preview for Videos, and a summarized html page
def make_preview_html
preview_path = 'preview'
styles = """
body .blk {
margin: 0 10px 10px 0;
display: inline-block;
}
body .blk img {
width: 160px;
@halida
halida / chef.sh
Last active August 29, 2015 14:16
Install chef
#!/bin/sh
# run
# curl http://ow.ly/JI3j3 | sh
mkdir -p /tmp/chef-install && cd /tmp/chef-install
wget https://opscode-omnibus-packages.s3.amazonaws.com/ubuntu/12.04/x86_64/chefdk_0.4.0-1_amd64.deb
sudo dpkg -i *.deb
cd && rm -rf /tmp/chef-install