Skip to content

Instantly share code, notes, and snippets.

@wgx
wgx / huepulse.css
Created March 14, 2022 15:29
slowly cycle the hue of an image
.huepulse {
-webkit-animation: huepulse 10s infinite;
}
@-webkit-keyframes huepulse {
0%, 100% { -webkit-filter: hue-rotate(0deg); }
50% { -webkit-filter: hue-rotate(180deg); }
}
@wgx
wgx / mattermost-brutalist-dark.json
Created August 11, 2021 08:12
Mattermost Brutalist Theme (dark)
{"sidebarBg":"#000000","sidebarText":"#ffffff","sidebarUnreadText":"#ffffff","sidebarTextHoverBg":"#000000","sidebarTextActiveBorder":"#ffffff","sidebarTextActiveColor":"#ffffff","sidebarHeaderBg":"#000000","sidebarHeaderTextColor":"#ffffff","onlineIndicator":"#00ff00","awayIndicator":"#ffa500","dndIndicator":"#ff0000","mentionBg":"#ffffff","mentionBj":"#ffffff","mentionColor":"#000000","centerChannelBg":"#000000","centerChannelColor":"#ffffff","newMessageSeparator":"#ffffff","linkColor":"#add8e6","buttonBg":"#7f7f7f","buttonColor":"#ffffff","errorTextColor":"#ff0000","mentionHighlightBg":"#ffff00","mentionHighlightLink":"#000000","codeTheme":"monokai"}
@wgx
wgx / hide-blue-ticks.js
Created July 16, 2020 16:33
Paste into the console on Twitter to hide tweets from verified accounts
// source: https://news.ycombinator.com/item?id=23860213
for (const node of document.querySelectorAll('[aria-label="Verified account"]')) {
node.closest('[role="article"]').remove()
}
@wgx
wgx / find_cams.sh
Created July 17, 2019 08:37
Nmap look for web servers / network cameras on current network
sudo nmap -Ap 80,8000,8080,443,8443,7443,7070,7000,22,23,21 192.168.1.0/24
@wgx
wgx / sqlizer-dotnet-example.md
Created March 10, 2019 10:01
SQLizer .NET API Client example code

To convert a file, use to the SQLizerFile object, like this:

SQLizerClient.Settings.ApiKey = "{your api key}"; // This can be found on https://sqlizer.io/account/

var file = new SQLizerClient.SQLizerFile("source.xlsx");

file.DatabaseType = SQLizerClient.DatabaseType.MySQL;
file.TableName = "my_table";
file.HasHeaders = true;

To convert a file, use to the SQLizerFile object, like this:

using SQLizerClient;

var file = new SQLizerFile("source.csv");

file.DatabaseType = DatabaseType.MySQL;
file.TableName = "my_table";
file.HasHeaders = true;
#!/bin/bash
lsb=$(i2cget -y -f 0 0x34 0x5f)
msb=$(i2cget -y -f 0 0x34 0x5e)
bin=$(( $(($msb << 4)) | $(($lsb & 0x0F))))
cel=`echo $bin | awk '{printf("%.0f", ($1/10) - 144.7)}'`
fah=`echo $cel | awk '{printf("%.0f", ($1 * 1.8) + 32)}'`
echo "CHIP Temp: $cel°C $fah°F"
@wgx
wgx / hosts
Created September 16, 2017 07:42
My default /private/etc/hosts
##
# Host Database
#
# localhost is used to configure the loopback interface
# when the system is booting. Do not change this entry.
##
127.0.0.1 localhost
255.255.255.255 broadcasthost
::1 localhost
@wgx
wgx / Gemfile
Created February 10, 2017 16:27
A sample Gemfile to be run by Bitbucket Pipelines
source 'https://rubygems.org'
gem 'jekyll', '3.0.1'
gem 'jekyll-paginate', '1.1.0'
gem 's3_website', '2.12.2'
@wgx
wgx / bitbucket-pipelines.yml
Created February 10, 2017 16:27
A sample bitbucket pipelines deployment configuration with Jekyll and s3_website
image: ruby:2.1.7
pipelines:
default:
- step:
script:
- bundler --version
- bundle install
- bundle exec jekyll build
branches: