Skip to content

Instantly share code, notes, and snippets.

View mjaverto's full-sized avatar

Mike Averto mjaverto

View GitHub Profile
@CombinedEffort
CombinedEffort / readme.en.md
Last active January 28, 2024 20:58
How to run Windows 11 on ARM in QEMU 6.1 on Apple Silicon Mac

How to run Windows 11 on ARM in QEMU 6.1 on Apple Silicon Mac

  1. Follow the excellent gist here, up to and including step 7 : https://gist.github.com/niw/e4313b9c14e968764a52375da41b4278

  2. I converted my VHDX to qcow2 - I doubt if that's significant, but YMMV:

./qemu-img convert -p -O qcow2 ~/Windows11_InsiderPreview_Client_ARM64_en-us__22454-orig.VHDX Windows11.img
  1. Run qemu with a slightly modified command-line. It may not be the most efficient, but it worked for me:
@robertainslie
robertainslie / hs-operations hub-count-high-value-line-items.js
Created August 3, 2021 19:35
HubSpot Operations Hub - Count High Value Line Items.
const hubspot = require('@hubspot/api-client');
exports.main = (event, callback) => {
const hubspotClient = new hubspot.Client({
apiKey: process.env.HAPIKEY
});
//First, make a call to get deal associations
hubspotClient.crm.deals.associationsApi.getAll(event.object.objectId, 'line_item').then((results) => {
@NewAlexandria
NewAlexandria / redshift-skew-finder.sql
Created February 19, 2020 17:58
Find Redshift tables with large skew
# this was provided by AWS reps
WITH base_skew AS (
SELECT id as tbl FROM stv_tbl_perm GROUP BY id
HAVING SUM(rows) > (SELECT 1000000 * ( MAX(node) + 1) FROM stv_slices)
AND (MAX(rows) / (MIN(rows) + 1.0)) >= 2.0
AND SUM(rows) <> (MAX(rows) * (SELECT MAX(node) + 1 FROM stv_slices))
),
table_slices AS (
SELECT t.slice, t.id, COUNT(b.blocknum) s_mb, COUNT(DISTINCT col) * COUNT(DISTINCT unsorted) ss_mb
@marcieltorres
marcieltorres / get-mx-records.js
Created August 25, 2018 01:58
nodeJS-get-mx-records-from-domain
var dns = require('dns');
function getMxRecords(domain){
return new Promise(function(resolve, reject) {
dns.resolveMx(domain, function (err, addresses) {
if (err) {
//console.log(err, err.stack)
resolve(null);
}
@abelardojarab
abelardojarab / zenbot_strategy.md
Last active January 29, 2023 18:20
zenbot strategy

Current strategy

$  ./zenbot.sh trade gdax.eth-USD --trend_ema 20 -period 7m --max_slippage_pct 0.48 --poll_trades 6000 --order_poll_time 6000 --order_adjust_time 6000 --oversold_rsi_periods=1000 --oversold_rsi=1000 --rsi_periods=1100 --neutral_rate=0.1 --max_sell_loss_pct=0.85 --max_buy_loss_pct=5 --buy_pct=100 --sell_pct=100 --selector gdax.eth-usd  --markup_sell_pct 0.25  --markdown_buy_pct 0.00  --reset-profit

The role of buy & sell percentages (PCT)

@tlfrd
tlfrd / .block
Last active April 8, 2023 19:44
Destination Globe (Spinning + Versor Drag)
license: mit
@jfinstrom
jfinstrom / source-TrueCNAM.module
Last active February 2, 2022 19:04
FreePBX CallerID Superfecta module for TrueCNAM
<?php
/**
* TrueCNAM module
* Service Details at http://truecnam.com/products
* Free Users get 2 lookups/minute 25/hour as of this note. Visit site for latest info
* Copyright (C) 2015 Sangoma Technologies
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of the
@blackjid
blackjid / README.md
Last active June 11, 2023 15:15
How configure your raspberry pi with dashing to have a awesome dashboard

Raspberry pi dashboard

This is what we did to setup a few dashboards at platanus

You'll need

  • Raspberry Pi
  • Dashing Service
  • Wifi stick (optional)
@pauloconnor
pauloconnor / gist:4707710
Last active December 1, 2022 09:33
Logstash Mutate Filter for stripping Linux color codes from log files
# Get rid of color codes
mutate {
gsub => ["message", "\x1B\[([0-9]{1,2}(;[0-9]{1,2})?)?[m|K]", ""]
}
@ecowden
ecowden / angular-partial-cache-busting
Created January 25, 2013 21:01
Cache busting for AngularJS partials is easy
/*
* Decide on your cache-busting strategy. In this example, we use the current timestamp, which will
* force a change every time the app is visited, but not every time the partial is loaded within a
* visit. Even better would be to use a hash of the file's contents to ensure that the file is always
* reloaded when the file changes and never reloaded when it isn't.
*/
var cacheBustSuffix = Date.now();
// Optionally, expose the cache busting value as a constant so other parts of your app can use it.
ngModule.constant("cacheBustSuffix", cacheBustSuffix);