Skip to content

Instantly share code, notes, and snippets.

View coreequip's full-sized avatar

Baxter coreequip

View GitHub Profile
@mrflobow
mrflobow / hazel_ocr_detect.sh
Last active August 9, 2022 10:52
Hazel - Detect OCR applied
#!/bin/bash
if grep Font "$1"
then
exit 0
else
exit 1
fi
@coreequip
coreequip / !Shorty.md
Last active November 3, 2020 15:23
Bookmarklet that copies a shortened URL from popular shopping sites into the clipboard.

Shorty

Bookmarklet that copies a shortened URL from popular shopping sites into the clipboard.

Just drag & drop this link -> Shorty <- to your bookmark bar. Edit it an paste as URL this text:

javascript:u=location.href;[[/^(https?:\/\/[a-z]+\.aliexpress\.com\/item\/[0-9]+\.html)\??.*$/,'$1'],[/^(https?:\/\/www\.ebay(?:\.[a-z]+)+\/itm\/)[^\/]+(\/[0-9]+)\??.*$/,'$1-$2'],[/^(https?:\/\/www\.gearbest\.com\/)[^\/]+(\/pp_[0-9]+\.html)\??.*$/,'$1-$2'],[/^(https?:\/\/\w+\.amazon\.[\w.]+\/).*?\/(B[A-Z0-9]+).*$/,'$1dp/$2'],[/^(https?:\/\/\w+\.alternate\.de\/).*?\/(product\/\d+).*$/,'$1$2'],[/^(https?:\/\/\w+\.conrad\.de\/).*?-(\d+\.html).*$/,'$1$2'],[/^(https:\/\/\www\.heise\.de\/).*(-\d+)\.html/,'$1$2'],[/^(https:\/\/\www\.golem\.de\/).*-(\d+)-(\d+)\.html/,'$1$2/$3']].forEach(r=>u=u.replace(r[0],r[1]));d=document;t=d.createElement('textarea');t.textContent=u;d.body.appendChild(t);s=d.getSelection();s.removeAllRanges();t.select();d.execCommand('copy');s.removeAllRanges();d.bo
@igoravl
igoravl / NetConnectionSharing.psm1
Created March 27, 2015 01:33
NetConnectionSharing (PowerShell Module)
#Based on code from http://superuser.com/questions/470319/how-to-enable-internet-connection-sharing-using-command-line
Function Set-NetConnectionSharing
{
Param
(
[Parameter(Mandatory=$true)]
[string]
$InternetConnection,
@denji
denji / golang-tls.md
Last active November 7, 2024 05:58 — forked from spikebike/client.go
Simple Golang HTTPS/TLS Examples
Generate private key (.key)
# Key considerations for algorithm "RSA" ≥ 2048-bit
openssl genrsa -out server.key 2048

# Key considerations for algorithm "ECDSA" ≥ secp384r1
# List ECDSA the supported curves (openssl ecparam -list_curves)
@mwrock
mwrock / gist:8476811
Created January 17, 2014 16:49
A stab at a Powershell Plugin Pattern. In working out how different VM providers can plugin to Boxstarter, I have come up with a pattern for dynamicaly resolving a plugin function. I want to expose a Enable-BoxstarterVM and based on its -Provider argument call the same named functioned available in any same named function loaded. This pattern cr…
function Resolve-VMPlugin {
[CmdletBinding()]
[OutputType([BoxstarterConnectionConfig])]
param(
$Provider
)
DynamicParam {
if(!$provider){$provider="HyperV"}
$module=Get-Module "Boxstarter.$provider"
@arnoutwittebrood
arnoutwittebrood / index.html
Created November 13, 2012 21:47
A CodePen by arnoutwittebrood. CSS guy
<div class="head"></div>
<div class="neck"></div>
<div class="rump"></div>
<div class="arm-upper-right"></div>
<div class="arm-bottom-right"></div>
<div class="trousers"></div>
<div class="leg-left">
<div class="leg-upper"></div>
@johnallers
johnallers / jquery.readOnlySuffix.js
Created May 22, 2012 02:14
Add a suffix to an text input, which cannot be overwritten.
(function( $ ) {
$.fn.readOnlySuffix = function(suffix) {
return this.each(function() {
var $this = $(this),
suffixLength = suffix.length,
oldValue = suffix,
mouseIsDown = false;
// Must be a text input or text area
if (!($this.is(":text") || $this.tagName.toLowerCase() == "textarea")){
GitHub.TreeFinder = function() {
if ($("#slider").length != 0) {
var a = this;
$.hotkeys({
t: function() {
a.show()
}
});
var d = new Image;
d.src = "/images/modules/ajax/spinner.gif"