Skip to content

Instantly share code, notes, and snippets.

View haoyun's full-sized avatar
🏠
Working from home

Yun Hao haoyun

🏠
Working from home
View GitHub Profile
@haoyun
haoyun / agenda.py
Created June 24, 2022 11:53 — forked from rougier/agenda.py
org-mode agenda calendar in the terminal
#!/usr/bin/env python3
# Copyright 2020 Nicolas P. Rougier - BSD License
#
# from reading org-mode emacs files, display a formated calendar in the
# terminal showing holidays and busy days and upcomiing events.
import holidays # https://pypi.org/project/holidays/
import calendar
import datetime
import orgparse # https://pypi.org/project/orgparse

Instructions for installing zsh plugins, for a variety of plugin managers

  • antibody: Add <owner>/<repo> to your plugins file. If you use static loading update the sh.

  • Antigen: Add antigen bundle <owner>/<repo> to your .zshrc.

  • Oh-My-Zsh:

    • Clone to OMZ's plugins' directory:
@haoyun
haoyun / starUml3.md
Created February 27, 2021 16:40 — forked from jjvillavicencio/starUml3.md
StarUml 3.

Recientemente StarUML se actualizó de 2.0 a 3.0. El método de crack original, la forma de modificar la función de verificación de licencia no se puede usar. La ubicación de instalación ha cambiado y se ha encontrado el archivo LicenseManagerDomain.js. ¿Qué debería hacer? El viejo conductor les dijo a todos que resolvieran el problema.

StarUML está escrito en nodejs. Específicamente, está escrito en el marco frontal de Electron. Todo el código fuente de starUML en la nueva versión viene empaquetado por la herramienta asar.

Ingresar al directorio (Windows)

C:\Program Files\StarUML\resources

@haoyun
haoyun / Chocolatey
Last active March 3, 2021 19:10
Windows Bootstrap
Set-ExecutionPolicy AllSigned
Set-ExecutionPolicy Bypass -Scope Process -Force; iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))
# essential
choco install -y 7zip adobereader chromium potplayer
choco install -y notepadplusplus # use --x86 to force the installation of x32 version, for TextFX to work
choco install -y microsoft-windows-terminal
choco install -y wincompose
# optional
choco install -y autohotkey mobaxterm
choco install -y neovim smartgit sumatrapdf.install vscodium
@haoyun
haoyun / 00-lenovo-x1-5th-gen-thinkfan-setup.md
Created June 27, 2019 21:38 — forked from abn/00-lenovo-x1-5th-gen-thinkfan-setup.md
Fedora thinkfan configuration for Lenovo X1 Carbon (5th Gen)

Thinkfan Configuration Notes

This are notes for configuration thinkfan for Fedora. This configuration procedure was followed on a Lenovo Thinkpad X1 Carbon (5th Gen) running Fedora 25.

Non standard (default) configuration was required for this machine as the default sensors are not available. Eg: /proc/acpi/ibm/thermal does not exist for this model.

An annoted configuration file has been included below. However, there is no guarentee that this will work as-is on every machine.

Installation

dnf -y install thinkfan
#!/bin/sh
# caps lock and return act as control when pressed with another keys.
# when pressed alone, caps lock acts as escape
# usage ./remap-keyboard.sh 200 - sets the timeout for keypress to be treated as ctrl
# if run without params, it sets delay to default 300ms
# if something goes wrong, control+m is treated as return in terminal / emacs
setxkbmap -option ctrl:nocaps
```
eval $(gnome-keyring-daemon -s)
export GNOME_KEYRING_CONTROL
export SSH_AUTH_SOCK
```
@haoyun
haoyun / bootstrap.sh
Last active September 28, 2020 20:29
#! /usr/bin/bash
#-------------------------------------------------------------------------------
# Enable RPMfusion repositories
sudo dnf install https://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-$(rpm -E %fedora).noarch.rpm https://download1.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-$(rpm -E %fedora).noarch.rpm
sudo dnf update
sudo dnf groupupdate core # Enabling Appstream data from the RPM Fusion repositories
reboot