Skip to content

Instantly share code, notes, and snippets.

View MatthewCallis's full-sized avatar
🍖
Hungry Goriya

Matthew Callis MatthewCallis

🍖
Hungry Goriya
View GitHub Profile
@xmlking
xmlking / docker-compose.yml
Last active March 24, 2023 01:12
cassandra healthcheck and dependency for docker compose
version: '2.1'
services:
cassandra:
image: cassandra:latest
networks:
- reactive-network
volumes:
- cassandra_data:/var/lib/cassandra
# - ${PWD}/data/cassandra/data:/var/lib/cassandra
@iwereth
iwereth / dis6502.c
Created July 12, 2017 06:04
Disassembler 6502
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <stdint.h>
static int Disassemble6502Op(unsigned char *codebuffer, int pc)
{
char opstr[256];
uint8_t *opcodes = &codebuffer[pc];
int count = 1;
@jgamblin
jgamblin / slackspotify.sh
Created April 19, 2017 01:10
A Script To Set Current Spotify Song As Slack Status
#!/bin/bash
APIKEY="From Here https://api.slack.com/custom-integrations/legacy-tokens"
SONG=$(osascript -e 'tell application "Spotify" to name of current track as string')
URLSONG=$(echo "$SONG" | perl -MURI::Escape -ne 'chomp;print uri_escape($_),"\n"')
while true
do
curl -s -d "payload=$json" "https://slack.com/api/users.profile.set?token="$APIKEY"&profile=%7B%22status_text%22%3A%22"$URLSONG"%22%2C%22status_emoji%22%3A%22%3Amusical_note%3A%22%7D" > /dev/null
sleep 60
done
@Avaq
Avaq / ramda-sanctuary.md
Last active March 1, 2019 00:26
Comprehensive Ramda to Sanctuary list
Ramda Sanctuary
add(a, b) add(b, a)
addIndex(f) ``
adjust(f, i, xs) ``
all(f, xs) ``
allPass(fs, x) allPass(fs, x)
always(x) K(x)
and(a, b) and(a, b)
any(f, x) ``
@nnooney
nnooney / index.html
Created December 31, 2016 01:45
NeDB & Electron & Rollup
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
</head>
<body>
<script src="build.js"></script>
</body>
</html>
@denizozger
denizozger / fxn.js
Created December 13, 2016 18:09
Ramda cheatsheet
// Replace this:
for (const value of myArray) {
console.log(value)
}
// with:
forEach(value => console.log(value), myArray)
const double = x => x * 2
map(double, [1, 2, 3])
import { assocPath, flip, path, init, last, toPairs } from 'ramda';
function isObject(value: any): boolean {
return Object.prototype.toString.call(value) === '[object Object]';
}
function isFunction(value: any): boolean {
return Object.prototype.toString.call(value) === '[object Function]';
}
@eguven
eguven / brew-list.sh
Last active August 17, 2025 22:27
List all packages installed using Homebrew and their sizes
# this original one uses values returned from 'brew info'
brew list --formula | xargs -n1 -P8 -I {} \
sh -c "brew info {} | egrep '[0-9]* files, ' | sed 's/^.*[0-9]* files, \(.*\)).*$/{} \1/'" | \
sort -h -r -k2 - | column -t
# faster alternative using 'du'
du -sch $(brew --cellar)/*/* | sed "s|$(brew --cellar)/\([^/]*\)/.*|\1|" | sort -k1h
/**
* Returns a Comparison of 2 Tasks
* @param {string} projectId the Project ID
* @param {Array<string>} taskIds a list of Task IDs
* @returns {Promise<Object>}
*/
const fetchComparison = (projectId, leftTaskId, rightTaskId) => (
new Promise(resolve => (
R.composeP(
resolve,