Skip to content

Instantly share code, notes, and snippets.

@anonymous1184
anonymous1184 / Ini.ahk
Last active May 22, 2024 15:54
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 July 18, 2024 03:38
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"
@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 July 20, 2024 20:26
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 July 17, 2024 05:21
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 July 13, 2024 11:54
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 git@github.com: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"

#!/usr/bin/ruby
# Create display override file to force Mac OS X to use RGB mode for Display
# see http://embdev.net/topic/284710
require 'base64'
data=`ioreg -l -d0 -w 0 -r -c AppleDisplay`
edids=data.scan(/IODisplayEDID.*?<([a-z0-9]+)>/i).flatten
vendorids=data.scan(/DisplayVendorID.*?([0-9]+)/i).flatten