Skip to content

Instantly share code, notes, and snippets.

View bloqhead's full-sized avatar

Daryn St. Pierre bloqhead

View GitHub Profile
@bloqhead
bloqhead / shrek-sjp.md
Created March 16, 2023 06:24
I asked ChatGPT to write a Hallmark film plot starring Shrek and Sarah Jessica Parker.

It's a typical day in the fairy tale land when Shrek, the lovable green ogre, receives an invitation to his high school reunion. Despite his initial reluctance, Shrek decides to attend the event, hoping to catch up with old friends and relive some fond memories.

Meanwhile, Sarah Jessica Parker, a successful career woman from the city, is struggling to find her footing after a recent breakup. When she receives an invitation to the same high school reunion, she decides to take a chance and attend, hoping to reconnect with some of her old classmates and rediscover her sense of self.

At the reunion, Shrek and Sarah Jessica Parker cross paths and strike up an unlikely friendship. Despite their initial differences, they find that they have more in common than they first thought, and they soon become inseparable.

As they spend more time together, Shrek and Sarah Jessica Parker begin to realize that there may be something more than friendship between them. However, their burgeoning romance is threatened by a jealo

@bloqhead
bloqhead / formatBytes.js
Created March 7, 2023 14:10 — forked from zentala/formatBytes.js
Convert size in bytes to human readable format (JavaScript)
function formatBytes(bytes,decimals) {
if(bytes == 0) return '0 Bytes';
var k = 1024,
dm = decimals || 2,
sizes = ['Bytes', 'KB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB'],
i = Math.floor(Math.log(bytes) / Math.log(k));
return parseFloat((bytes / Math.pow(k, i)).toFixed(dm)) + ' ' + sizes[i];
}
// Usage:
@bloqhead
bloqhead / multi-git-win.md
Created February 10, 2023 17:32 — forked from rosswd/multi-git-win.md
Setting up a Github and Bitbucket account on the same computer on Mac OS. Now with a guide for Windows 10.

Setting up github and bitbucket on the same computer (Windows)

Guide for Windows

mix3d asked for some help using this guide with windows so here we go. This was tested with Windows 10. Run all commands in Git Bash once it's installed.

Github will be the main account and bitbucket the secondary.

Git for Windows

  • Download and install Git for Windows
    • In the installer, select everything but decide if you want a desktop icon (2nd step)
@bloqhead
bloqhead / settings.json
Created October 2, 2020 17:57
Enabling Emmet in Markdown for VSCode.
{
"emmet.excludeLanguages": [],
"emmet.includeLanguages": {
"javascript": "html",
"php": "html",
"twig": "html",
"liquid": "html",
"vue": "html",
"nunjucks": "html",
"markdown": "html"
@bloqhead
bloqhead / auto-signoff.sh
Created July 29, 2020 14:00
Automatic signoff for git commits.
#!/bin/sh
NAME=$(git config user.name)
EMAIL=$(git config user.email)
if [ -z "$NAME" ]; then
echo "empty git config user.name"
exit 1
fi
if [ -z "$EMAIL" ]; then
echo "empty git config user.email"
exit 1
@bloqhead
bloqhead / TikTok.md
Last active July 8, 2020 16:37
An excerpt from a reddit thread about how vile TikTok is.

TikTok is Racist, Anti-Progressive Chinese Spyware.

TikTok Admits It Suppressed Videos by Disabled, Queer, and Fat Creators. https://slate.com/technology/2019/12/tiktok-disabled-users-videos-suppressed.html

TikTok has been accused of secretly gathering "vast quantities" of user data and sending it to servers in China. https://www.bbc.com/news/business-50640110

TikTok is paying the FTC a fine of $5.7 million for collecting the data of kids under 13. https://www.vox.com/the-goods/2019/2/28/18244996/tiktok-children-privacy-data-ftc-settlement

TikTok censors all reference to the Hong Kong protests. https://www.washingtonpost.com/technology/2019/09/15/tiktoks-beijing-roots-fuel-censorship-suspicion-it-builds-huge-us-audience/?noredirect=on

@bloqhead
bloqhead / vue.config.js
Created June 16, 2020 21:13
Cache busting in Vue.js projects.
module.exports = {
chainWebpack: config => {
config.output
.chunkFilename('[name].js?t=[chunkhash:8]')
}
}

Keybase proof

I hereby claim:

  • I am bloqhead on github.
  • I am kryosleep (https://keybase.io/kryosleep) on keybase.
  • I have a public key ASBH8SWmbJr-enTu5mzWv22H9ADdzg_hugO0ywhSQ1ezdwo

To claim this, I am signing this object:

@bloqhead
bloqhead / docker-compose.yml
Last active May 15, 2019 13:36
Simple WordPress Docker setup.
version: '3.3'
services:
mysql:
image: mysql:5.7
ports:
- "3306:3306"
volumes:
- db_data:/var/lib/mysql
restart: always
@bloqhead
bloqhead / mojave-text-fix.sh
Created September 26, 2018 04:35
This fixes the text antialiasing issue in Electron apps on macOS Mojave. Run this command in your terminal, then log out and back in to see the changes take effect.
defaults write -g CGFontRenderingFontSmoothingDisabled -bool NO