Skip to content

Instantly share code, notes, and snippets.

View vagelim's full-sized avatar

vagelim vagelim

View GitHub Profile
vagelim /
Created January 10, 2023 17:39
nc for wol
#replace MAC value with NIC MAC
echo -e $(echo $(printf 'f%.0s' {1..12}; printf "$(echo $MAC | sed 's/://g')%.0s" {1..16}) | sed -e 's/../\\x&/g') | nc -w1 -u -b 4000
# from
vagelim / PythonSimpleWebsocket
Created January 12, 2021 08:06 — forked from rich20bb/PythonSimpleWebsocket
Simple websocket server in Python. Echos back whatever is received. Works with Chome, Firefox 16, IE 10.
import time
import struct
import socket
import hashlib
import base64
import sys
from select import select
import re
import logging
from threading import Thread
vagelim / export_google_music.js
Created August 10, 2020 15:07 — forked from dcalacci/export_google_music.js
Export your Google Music Library and Playlists (Google Play Music All Access) (see for more)
// Jeremie Miserez <>, 2015
// A little bit of Javascript to let you export your Google Music library, playlists, and album track lists :)
// I posted this as an answer here:
// 1. Go to: (or your playlist)
// 2. Open a developer console (F12 for Chrome). Paste
// code below into the console.
vagelim / deploy_to_s3.yaml
Created July 15, 2020 15:09
github action to deploy to s3 static site and flush cf
name: Deploy and flush cache
- master
runs-on: ubuntu-latest
vagelim /
Created June 23, 2020 14:52 — forked from XVilka/
True Colour (16 million colours) support in various terminal applications and terminals

Terminal Colors

There exists common confusion about terminal colors. This is what we have right now:

  • Plain ASCII
  • ANSI escape codes: 16 color codes with bold/italic and background
  • 256 color palette: 216 colors + 16 ANSI + 24 gray (colors are 24-bit)
  • 24-bit true color: "888" colors (aka 16 milion)
vagelim / Makefile
Created May 15, 2020 20:19 — forked from prwhite/Makefile
Add a help target to a Makefile that will allow all targets to be self documenting
# Add the following 'help' target to your Makefile
# And add help text after each target name starting with '\#\#'
help: ## Show this help.
@fgrep -h "##" $(MAKEFILE_LIST) | fgrep -v fgrep | sed -e 's/\\$$//' | sed -e 's/##//'
# Everything below is an example
target00: ## This message will show up when typing 'make help'
@echo does nothing
vagelim / smc_read.c
Created April 19, 2020 19:20
returns secret osk needed to run macos hackintosh
* smc_read.c: Written for Mac OS X 10.5. Compile as follows:
* gcc -Wall -o smc_read smc_read.c -framework IOKit
#include <stdio.h>
#include <IOKit/IOKitLib.h>
/** @jsx React.DOM */
var STATES = [
'AL', 'AK', 'AS', 'AZ', 'AR', 'CA', 'CO', 'CT', 'DE', 'DC', 'FL', 'GA', 'HI',
'ID', 'IL', 'IN', 'IA', 'KS', 'KY', 'LA', 'ME', 'MD', 'MA', 'MI', 'MN', 'MS',
'MO', 'MT', 'NE', 'NV', 'NH', 'NJ', 'NM', 'NY', 'NC', 'ND', 'OH', 'OK', 'OR',
'PA', 'RI', 'SC', 'SD', 'TN', 'TX', 'UT', 'VT', 'VA', 'WA', 'WV', 'WI', 'WY'
var Example = React.createClass({

Make it real

Ideas are cheap. Make a prototype, sketch a CLI session, draw a wireframe. Discuss around concrete examples, not hand-waving abstractions. Don't say you did something, provide a URL that proves it.

Ship it

Nothing is real until it's being used by a real user. This doesn't mean you make a prototype in the morning and blog about it in the evening. It means you find one person you believe your product will help and try to get them to use it.

Do it with style

vagelim /
Created August 5, 2019 22:49
latest ecs ami
data "aws_ami" "latest" {
most_recent = true
owners = ["591542846629"]
filter {
name = "name"
values = ["*amazon-ecs-optimized"]
filter {