Skip to content

Instantly share code, notes, and snippets.

@anonymous1184
anonymous1184 / Ini.ahk
Last active November 18, 2024 06:04
Automatic configuration file handling.
; Version: 2023.04.20.1
; Usages and examples: https://redd.it/s1it4j
Ini(Path, Sync := true) {
return new Ini_File(Path, Sync)
}
class Ini_File {
<!DOCTYPE html>
<html>
<head>
<title>Lazy load youtube embed</title>
<meta charset="UTF-8" />
</head>
<body>
<main>
<h1>Example of a lazy loaded embedded YouTube video</h1>
<iframe
@wkliwk
wkliwk / btt.sh
Last active March 24, 2025 22:10
BTT reset trial time
# BetterTouchTool reset trial time
# ** All preference will reset
echo "remove ~/Library/Preferences/com.hegenberg.BetterTouchTool.plist"
rm -rf ~/Library/Preferences/com.hegenberg.BetterTouchTool.plist
echo "Done"
echo "remove ~/Library/Application\ Support/BetterTouchTool/"
rm -rf ~/Library/Application\ Support/BetterTouchTool/
echo "Done"
@Birch-san
Birch-san / make_portable.sh
Last active September 12, 2024 12:09
Make a macOS executable binary or .dylib portable
#!/usr/bin/env bash
# Licensed by author Alex Birch under CC BY-SA 4.0
# https://creativecommons.org/licenses/by-sa/4.0/
# Example input:
# ./make_portable.sh mycoolbinary
# where mycoolbinary is a mach-o object file
# (for example an executable binary or a .dylib)
#
@Konafets
Konafets / DataTable.vue
Last active July 23, 2019 15:17
Watching child component computed properties
<template>
<table-component
:data="[
{ firstName: 'John', birthday: '04/10/1940'},
{ firstName: 'Paul', birthday: '18/06/1942'},
{ firstName: 'George', birthday: '25/02/1943'},
{ firstName: 'Ringo', birthday: '07/07/1940'},
]"
sort-by="firstName"
sort-order="asc"
@Zazcallabah
Zazcallabah / transparency.ahk
Created January 23, 2017 08:27
AutoHotkey Script for controlling transparency of windows. I cant remember who made this, saved for future reference
; [Win+A] Toggle always on top
#a:: Winset, Alwaysontop, , A
; [Win+WheelUp] Increase opacity
#WheelUp::
DetectHiddenWindows, on
WinGet, curtrans, Transparent, A
if ! curtrans
curtrans = 255
newtrans := curtrans + 8
@lopspower
lopspower / README.md
Last active April 29, 2025 07:43
Hexadecimal color code for transparency

Hexadecimal color code for transparency

Twitter

How to set transparency with hex value ?

For example, you want to set 40% alpha transparence to #000000 (black color), you need to add 66 like this #66000000.

Download This sample on Google Play Store

@shimondoodkin
shimondoodkin / php_tiny_curl.php
Last active May 6, 2024 10:51
php tiny curl - a curl function with method, data, headers, cookies, simple to use.
function encodeURIComponent($str) {
$revert = array('%21'=>'!', '%2A'=>'*', '%27'=>"'", '%28'=>'(', '%29'=>')');
return strtr(rawurlencode($str), $revert);
}
class curl_onHeaders
{
@trusktr
trusktr / DefaultKeyBinding.dict
Last active April 21, 2025 08:40
My DefaultKeyBinding.dict for Mac OS X
/* ~/Library/KeyBindings/DefaultKeyBinding.Dict
This file remaps the key bindings of a single user on Mac OS X 10.5 to more
closely match default behavior on Windows systems. This makes the Command key
behave like Windows Control key. To use Control instead of Command, either swap
Control and Command in Apple->System Preferences->Keyboard->Modifier Keys...
or replace @ with ^ in this file.
Here is a rough cheatsheet for syntax.
Key Modifiers
@dakoctba
dakoctba / gist:7676845
Last active February 21, 2025 13:00
How To Reset Your Github Fork

##How To Reset Your Github Fork

Let’s say I want to contribute to a project on github. The project repository is at wp-cli/wp-cli. First I fork it, and then clone the resulting repository, scribu/wp-cli:

git clone --recursive [email protected]:scribu/wp-cli.git
cd wp-cli

Now, I make some commits to master, push them to my fork and open a pull request. Piece of cake:

git commit -m "awesome new feature"