Skip to content

Instantly share code, notes, and snippets.

View james2doyle's full-sized avatar

James Doyle james2doyle

View GitHub Profile
<?php
namespace App\Livewire\Attributes;
use Attribute;
use Livewire\Features\SupportAttributes\Attribute as LivewireAttribute;
use function Livewire\store;
#[Attribute(Attribute::IS_REPEATABLE | Attribute::TARGET_CLASS | Attribute::TARGET_METHOD)]
class PathMe {
moves: string[] = [];
constructor() {
this.moves = [];
return this;
}
moveTo(x: number, y: number) {
@a-churchill
a-churchill / README.md
Last active November 11, 2022 05:52
Next.js Dockerfile

This is the Dockerfile we use at Causal to deploy Next.js. It is loosely based on the template provided by Vercel here.

@rscs
rscs / FlipperZero-RFID-blanks.md
Last active April 16, 2024 05:37
Rewritable RFID blanks for Flipper Zero

A list of rewritable RFID blanks that are compatible with Flipper Zero.

X indicates a particular protocol is writable.

? indicates it is unknown if a particular protocol is writable.

Brand Type Chip EM4100 H10301 Indala26 IoProxXSF AWID FDX-A FDX-B HIDProx HIDExt Pyramid Viking Jablotron Paradox PAC/Stanley Keri Gallagher
ETEKJOY Fob EM4305 X X X X X X
@frabert
frabert / COPYING
Last active December 21, 2023 13:35
Favicons for HN
This is free and unencumbered software released into the public domain.
Anyone is free to copy, modify, publish, use, compile, sell, or
distribute this software, either in source code form or as a compiled
binary, for any purpose, commercial or non-commercial, and by any
means.
In jurisdictions that recognize copyright laws, the author or authors
of this software dedicate any and all copyright interest in the
software to the public domain. We make this dedication for the benefit
@ieatfood
ieatfood / Connect Airpods.applescript
Last active February 18, 2024 22:25 — forked from jaredmoody/Connect Airpods.applescript
An Applescript to connect bluetooth devices, such as Airpods. Nice when paired with an alfred trigger.
# Taken from https://www.reddit.com/r/MacOS/comments/i4czgu/big_sur_airpods_script/gck3gz3/
# by https://github.com/smithumble
use framework "IOBluetooth"
use scripting additions
set AirPodsName to "AirPods"
on getFirstMatchingDevice(deviceName)
repeat with device in (current application's IOBluetoothDevice's pairedDevices() as list)
@mengwangk
mengwangk / init.vim
Last active November 29, 2023 12:44
Full Neovim init.vim
"---- vim-plug setup ----
let vimplug_exists=expand('~/.config/nvim/autoload/plug.vim')
if has('win32')&&!has('win64')
let curl_exists=expand('C:\Windows\Sysnative\curl.exe')
else
let curl_exists=expand('curl')
endif
if !filereadable(vimplug_exists)
if !executable(curl_exists)
@mtwalsh
mtwalsh / deploy.php
Last active October 20, 2021 22:17
Deployer recipe for Laravel projects.
<?php
namespace Deployer;
require 'recipe/common.php';
// Project name
set('application', 'enovate.co.uk');
// Project repository
set('repository', 'git@githosting.com:enovatedesign/project.git');
@bee-san
bee-san / timsort.py
Last active August 15, 2021 10:28
An Python implementation of Timsort
# based off of this code https://gist.github.com/nandajavarma/a3a6b62f34e74ec4c31674934327bbd3
# Brandon Skerritt
# https://skerritt.tech
def binary_search(the_array, item, start, end):
if start == end:
if the_array[start] > item:
return start
else:
return start + 1
@tylerzey
tylerzey / regex.js
Last active August 5, 2020 13:53
A List Of Helpful Regex Examples
let re;
//this looks for the string between the slashes. it'll match hello but not HeLlo.
re = /hello/;
//the lower case i means be case insensitive. this will match HellO.
re = /hello/i;
// explaination for common search characters