Skip to content

Instantly share code, notes, and snippets.

View jbwl's full-sized avatar
🐫
Spooling....

"Jon" jbwl

🐫
Spooling....
View GitHub Profile
@pauloklaus
pauloklaus / FileDownload.vue
Last active January 11, 2024 12:58
File download (Vue3 + TS)
<template>
<a v-if="isDownloadReady" ref="linkElement">Download</a>
<span v-else>{{ downloadStatus }}</span>
</template>
<script setup>
const props = defineProps<{
fileName: String
fileType: String
content: Blob
@moyix
moyix / killbutmakeitlooklikeanaccident.sh
Created February 5, 2022 22:51
Script to inject an exit(0) syscall into a running process. NB: only x86_64 for now!
#!/bin/bash
gdb -p "$1" -batch -ex 'set {short}$rip = 0x050f' -ex 'set $rax=231' -ex 'set $rdi=0' -ex 'cont'
@IlCallo
IlCallo / move.ts
Last active March 14, 2024 16:21
Apply Drag and Drop to QTable rows using SortableJs
// Taken from https://github.com/angular/components/blob/master/src/cdk/drag-drop/drag-utils.ts
/**
* @license
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
@joepie91
joepie91 / no-your-cryptocurrency-cannot-work.md
Last active April 13, 2024 03:21
No, your cryptocurrency cannot work

No, your cryptocurrency cannot work

Whenever the topic of Bitcoin's energy usage comes up, there's always a flood of hastily-constructed comments by people claiming that their favourite cryptocurrency isn't like Bitcoin, that their favourite cryptocurrency is energy-efficient and scalable and whatnot.

They're wrong, and are quite possibly trying to scam you. Let's look at why.

What is a cryptocurrency anyway?

There are plenty of intricate and complex articles trying to convince you that cryptocurrencies are the future. They usually heavily use jargon and vague terms, make vague promises, and generally give you a sense that there must be something there, but you always come away from them more confused than you were before.

@tomhicks
tomhicks / plink-plonk.js
Last active March 18, 2024 02:23
Listen to your web pages

mysql2 gem + mariadb + Alpine Linux

tl;dr Use mariadb-dev. In case of Alpine Linux 3.8, 3.9, use mysql2 >= 0.4.10.

Starting with Alpine Linux 3.8 there are basically 2 options to install the mysql2 gem:

1.sh:

@Yama-Tomo
Yama-Tomo / 0.how_to_introduced_mutagen_in_rails.md
Last active August 11, 2021 06:33
how to introduced mutagen in rails
  • mutagen をインストールする
$ brew install mutagen-io/mutagen/mutagen
  • mutagen.yml をプロジェクトルートへ作成する
sync:
@efrapp
efrapp / howto-setup-sidekiq-on-heroku.md
Last active December 12, 2023 12:32
Steps to setup Sidekiq on Heroku

Setup Sidekiq for Heroku

Install Heroku Redis Add-on

Option 1: Using the dashboard

Go to the Resources tab and in the Add-ons section type Heroku Redis in the search field. It will appear in the search list. Click on it and a modal will show up to install it, click in the Provision button to start the installation.

@kevinelliott
kevinelliott / 1-macOS-10.14-mojave-setup.md
Last active April 2, 2023 11:46
macOS 10.14 Mojave Mostly-Automated Setup

To support my open-source work, consider adding me on Patreon.

macOS 10.14 Mojave Mostly-Automated Setup

An easy to refer to document for regularly setting up macOS 10.14 Mojave.

Controversy

The topic of recipe-based frequent fresh reinstalls of macOS is a controversial issue. Some people are against reinstalling macOS, citing that they have never had an issue with Apple provided upgrade installs.

@HunterDG
HunterDG / SplitTunnel.app
Created April 18, 2018 03:29
Mac Cisco VPN Split Tunnel AppleScript
global done
set done to 0
on idle
set status to do shell script "scutil --nc status "VPN (Cisco IPSec)" | sed -n 1p"
# do shell script "scutil --nc start "VPN (Cisco IPSec)"
if status is "Connected" then
if done is not 1 then
display notification "VPN Connected, splitting tunnel"
set gateway to do shell script "( netstat -rn | awk '/default/ {if ( index($6, \"en\") > 0 ){print $2} }' ) # gets non-VPN default gateway"