Skip to content

Instantly share code, notes, and snippets.

View sitedyno's full-sized avatar
💭
Very unhappy with the new feed.

sitedyno

💭
Very unhappy with the new feed.
View GitHub Profile
@sitedyno
sitedyno / nvim-html-diagnostics-for-css-classes.lua
Created April 10, 2024 16:56
This snippet shows how you can detect CSS classes in html and display diagnostics about them if desired. See comments for credits (not me).
-- https://linktr.ee/TymekDev
-- Alright, I got the HTML -> classes -> diagnostics part. Now all that's left is:
-- 1. Parse CSS file(s) for selectors
-- 2. ~~Intersect~~ Get set difference of class names and selectors
-- 3. Run this stuff on save (?)
-- Anyone wants to take this home? <@216716701973217290>?
-- Demo: https://asciinema.org/a/VQEt82360Kugo0gkg33fVYe57
@sitedyno
sitedyno / Makefile
Created November 23, 2019 18:37
make can be nifty at times...
# prefix all files with current datetime
date=`date +%Y-%m-%d_%H:%m:%S`
db="tmp/$(date).db"
define MigrateBlocks
/*create new table*/
CREATE TABLE `new_blocks` (
`id` INTEGER NULL PRIMARY KEY AUTOINCREMENT
, `region_id` INTEGER NULL
, `title` VARCHAR(100) NULL
@sitedyno
sitedyno / update-fixtures
Last active October 10, 2019 19:44
Update fixture names
#!/usr/bin/env bash
find . -wholename '*/tests/TestCase/*Test.php' \
-not -path './vendor/*' \
-exec sed -i \
'
s/plugin.croogo\/taxonomy.model_taxonomy/plugin.Croogo\/Taxonomy.ModelTaxonomy/
s/plugin.taxonomy.type_vocabulary/plugin.Croogo\/Taxonomy.TypesVocabulary/
s/plugin.croogo\/taxonomy.vocabulary/plugin.Croogo\/Taxonomy.Vocabulary/
s/plugin.taxonomy.model_taxonomy/plugin.Croogo\/Taxonomy.ModelTaxonomy/
@sitedyno
sitedyno / phergie.service
Created May 10, 2017 15:28
Systemd service for phergie (react version)
[Unit]
Description=Run Phergie IRC bot (react version)
After=network.target
[Service]
Type=simple
# modify for your environment
WorkingDirectory=/home/phergie
User=phergie
Group=phergie
@sitedyno
sitedyno / irc-flooding.md
Last active August 31, 2017 03:24
Research & thoughts on IRC 'floods'

Research

I was unable to find any detailed information at Freenode's or Rizon's websites about their flood controls. If you know of another network's policies please comment.

IRCD-Hybrid

A lightweight, high-performance internet relay chat daemon.

/* MAX_FLOOD is the amount of lines in a 'burst' we allow from a client,
@sitedyno
sitedyno / reclaimWindows10.ps1
Created February 1, 2017 18:52 — forked from alirobe/reclaimWindows10.ps1
"Reclaim Windows 10" turns off a bunch of unnecessary Windows 10 telemetery, removes bloatware, and privacy invasions. Review and tweak before running. Scripts for reversing are included and commented. Fork via https://github.com/Disassembler0 (different defaults)
##########
# Win10 Initial Setup Script
# Author: Disassembler <[email protected]>
# Version: 1.7, 2016-08-15
# dasm's script: https://github.com/Disassembler0/Win10-Initial-Setup-Script/
# THIS IS A PERSONALIZED VERSION
# This script leaves more MS defaults on, including MS security features.
# Tweaked based on personal preferences for @alirobe 2016-11-16 - v1.7.1
@sitedyno
sitedyno / gist:ecc22fab12a386c4e312780a70fb43c0
Created December 24, 2016 20:34
Database or related packages from packagist that claim async
https://github.com/koolkode/async-database
https://github.com/iRAP-software/package-async-query
https://github.com/nrk/predis-async
https://github.com/recoilphp/database
https://github.com/voryx/PgAsync
https://github.com/Repo2/query-reactor
https://github.com/jessecascio/spider
https://github.com/shen2/EasyRedis
https://github.com/huyanping/async-mysql-php
https://github.com/dustingraham/react-mysql
@sitedyno
sitedyno / rkj-repos.zsh-theme
Last active March 18, 2017 06:18
Remove hg_prompt_info, doesn't work for me.
# user, host, full path, and time/date
# on two lines for easier vgrepping
# entry in a nice long thread on the Arch Linux forums: http://bbs.archlinux.org/viewtopic.php?pid=521888#p521888
function hg_prompt_info {
hg prompt --angle-brackets "\
<hg:%{$fg[magenta]%}<branch>%{$reset_color%}><:%{$fg[magenta]%}<bookmark>%{$reset_color%}>\
</%{$fg[yellow]%}<tags|%{$reset_color%}, %{$fg[yellow]%}>%{$reset_color%}>\
%{$fg[red]%}<status|modified|unknown><update>%{$reset_color%}<
patches: <patches|join( → )|pre_applied(%{$fg[yellow]%})|post_applied(%{$reset_color%})|pre_unapplied(%{$fg_bold[black]%})|post_unapplied(%{$reset_color%})>>" 2>/dev/null
Get-AppxPackage *Amazon.com* | Remove-AppxPackage
Get-AppxPackage *Bing* | Remove-AppxPackage
Get-AppxPackage *CandyCrush* | Remove-AppxPackage
Get-AppxPackage *DellShop* | Remove-AppxPackage
Get-AppxPackage *Flipboard* | Remove-AppxPackage
Get-AppxPackage *Kindleforwindows* | Remove-AppxPackage
Get-AppxPackage *Microsoft.3DBuilder* | Remove-AppxPackage
Get-AppxPackage *Microsoft.CommsPhone* | Remove-AppxPackage
Get-AppxPackage *Microsoft.Getstarted* | Remove-AppxPackage
Get-AppxPackage *Microsoft.Messaging* | Remove-AppxPackage
{
"minimum-stability": "dev",
"prefer-stable": true,
"repositories": [
{
"type": "vcs",
"url": "https://github.com/svpernova09/phergie-irc-plugin-react-ping"
},
{
"type": "vcs",