Skip to content

Instantly share code, notes, and snippets.

View janoamaral's full-sized avatar
🏁
Gentlemen, start your engines!

Alejandro Amaral janoamaral

🏁
Gentlemen, start your engines!
View GitHub Profile
@janoamaral
janoamaral / websearch.patch
Created September 27, 2020 15:09
Add web search capabilities to `swhd`. Usage: Select text in any program and press `WIN+ALT+S`. A new Chrome tab comes up with Duckduck search result.
diff --git a/config.def.h b/config.def.h
index 1dbc8ca..b01d887 100644
--- a/config.def.h
+++ b/config.def.h
@@ -15,6 +15,7 @@ const int VK_C = 0x43;
// CUSTOM FUNCTION ID
const unsigned int FUNCTION_RELOAD = 1;
const unsigned int FUNCTION_RELOAD = 2;
+const unsigned int FUNCTION_SEARCH = 3;
@trongthanh
trongthanh / mojave.xml
Last active January 26, 2023 19:04
macOS Mojave dynamic background re-implement as GTK+ background slideshow. Background images are changed to reflect the time of the day.
<!-- Instructions:
- Download and unzip Mojave dynamic background here: https://files.rb.gd/mojave_dynamic.zip
- Rename the extracted folder as "mojave-background" (Excuse the trouble but I renamed it on my machine and already use that path in the XML file)
- Save this xml file next to the Mojave background files
- Fix the path to the background images below (better using absolute path)
- Lastly, either:
+ GNOME: Use gnome-tweaks tool to select this XML as wallpaper (as default wallpaper settings won't let you choose wallpaper from custom path)
+ MATE: Go to background setting (in Appearance) > Choose +Add... > make sure **All files** filter is selected at the bottom right > Then choose mojave.xml
-->
<background>
@BoGnY
BoGnY / README.md
Last active March 12, 2024 15:53
[WINDOWS] How to enable auto-signing Git commits with GnuPG for programs that don't support it natively

[WINDOWS] How to enable auto-signing Git commits with GnuPG for programs that don't support it natively

This is a step-by-step guide on how to enable auto-signing Git commits with GPG for every applications that don't support it natively (eg. GitHub Desktop, Eclipse, Git Tower, ...)

Requirements

  • Install GPG4Win: this software is a bundle with latest version of GnuPG v2, Kleopatra v3 certificate manager, GNU Privacy Assistant (GPA) v0.9 which is a GUI that uses GTK+, GpgOL and GpgEX that are respectively an extension for MS Outlook and an extension for Windows Explorer shell
  • Install Git for Windows: so you can have a *nix based shell, this software is a bundle with latest version of Git which use MINGW environment, a Git bash shell, a Git GUI and an extension for Windows Explorer shell (Make sure your local version of Git is at least 2.0, otherwise Git don't have support for automatically sign your commits)
  • Verify
@tanyuan
tanyuan / smart-caps-lock.md
Last active April 24, 2024 15:22
Smart Caps Lock: Remap Caps Lock to Control AND Escape

Smart Caps Lock: Remap to Control AND Escape (Linux, Mac, Windows)

Caps Lock 變成智慧的 Control 以及 Escape

  • 單獨輕按一下就是 Escape
  • 若按下時同時按著其他鍵,就會是 Control

這應該是 Vim 和 Emacs 的最佳解了!(Emacs? Bash 的快捷鍵就是 Emacs 系列的)

  • Send Escape if you tap Caps Lock alone.
@nicoulaj
nicoulaj / build-zsh.sh
Created November 25, 2010 20:19
Build Zsh from sources on Ubuntu
#!/bin/sh​
# Build Zsh from sources on Ubuntu.
# From http://zsh.sourceforge.net/Arc/git.html and sources INSTALL file.
# Some packages may be missing
sudo apt-get install -y git-core gcc make autoconf yodl libncursesw5-dev texinfo
git clone git://zsh.git.sf.net/gitroot/zsh/zsh
cd zsh