Skip to content

Instantly share code, notes, and snippets.

View nektro's full-sized avatar
🌻
if you know, you know

Meghan Denny nektro

🌻
if you know, you know
View GitHub Profile
@nektro
nektro / ytdla.ps1
Created April 24, 2019 10:06
youtube-dl audio powershell
youtube-dl -x --audio-format m4a -o "%(uploader)s - %(title)s - %(id)s.%(ext)s" $args

the base idea for the lang is to merge object oriented and function in a way that forces the code to preserve the direction of data in the same direction of the page

for example when you have an object method you can do object.call().call().call().call() and chain methods together calling methods on the return types of the method prior

however, when you have a static function, this flow is reverse and goes inward-out ie call(call(call(call(object))))

so what my lang does is makes it so everything is a method call. by removing methods completely. class definitions are only allowed to have the properties, and a constructor method

Keybase proof

I hereby claim:

  • I am nektro on github.
  • I am nektro (https://keybase.io/nektro) on keybase.
  • I have a public key ASDrf2NGIRUIhTL0Q-W-WOtb4NhTV26AcwT265RmVSmdSwo

To claim this, I am signing this object:

-----BEGIN PGP PUBLIC KEY BLOCK-----
mQINBF11bxYBEAC33e7bGs/uISbcR4vCZ0z/PsFHBKL1eL/VpzbDStHYo3N4e7kv
cHd1NptpRltSgdqsC3bAgVS37q8sQBDsQXEpWtFGC1b3v82OI8E7caTlNDZKwv2P
UAwT7R9SdoX8QJImWo7eRZDMnFMc0/HbOXNzvWYExoYcQM3awlUjTEOsaX3WwFDx
fZ0MKcx5XTXk3qSixZLt7pIyx4CaIACUM36wbvxU7CpSL0qkRyGwlWjangvN+b9o
vmPbZk3uVeZO4mvHUmimpiZYCOjrDBaIMAUm9KBtfSWZU25wbj5QKvKVkSyDvWFw
Wz5YdBkLWsORBU5G8KTZAMh/XdDuO2hXPIlbUagCmxm7WFPtglY//nCuXiUAGPxL
lBeKFlduJ6er4ICXGYtOJ0g9Ay5x6CM1Dn7a0myM2ZGXa/SlTMfbLaa9/4xfy0Ew
aLqwNQQ7vkjTyuW2AKgEsGNYUYIZ7iAaYoR+HuapQdRQ8anTNrL4g1M3ja2wEPcb
@nektro
nektro / hello_world.ll
Last active August 7, 2020 05:55
LLVM 10 Hello World
@0 = global [15 x i8] c"Hello, world!\0A\00"
define i32 @1(i8* %0) {
1:
%2 = ptrtoint i8* %0 to i64
%3 = call i64 asm sideeffect "syscall", "=r,{rax},{rdi},{rsi},{rdx}"(i64 1, i64 1, i64 %2, i64 15)
ret i32 0
}
define i32 @main() {
0:
@nektro
nektro / get_github_user.sh
Created September 29, 2020 10:39
./get_github_user.sh <username>
#!/usr/bin/env bash
c1=1
c2=0
mkdir -p $1
cd $1
IFS=$'\n'
uid="$GITHUB_CLIENT"
apiVersion: apps/v1
kind: DaemonSet
metadata:
name: node_exporter
namespace: prometheus/node_exporter
spec:
template:
metadata:
labels:
name: node_exporter
@nektro
nektro / network_containers.go
Created October 7, 2020 23:23
Read the names and IDs of all the containers in a docker network
package main
import (
"encoding/json"
"fmt"
"io/ioutil"
"net"
"net/http"
)
@nektro
nektro / web_view.php
Last active November 18, 2020 21:14
Open a TCP socket and create a handmade HTTP 1.1 GET request
<?php
/**
* Connect to an HTTP server and echo the response
*/
$host = 'localhost';
$port = 80;
$fp = fsockopen($host, $port, $errno, $errstr, 30);
if (!$fp) {
echo "$errstr ($errno)<br />\n";
}
@nektro
nektro / Dockerfile
Created March 19, 2021 08:57
minimal requirements to build and install zig from scratch with docker
FROM ubuntu:18.04
ENV DEBIAN_FRONTEND=noninteractive
WORKDIR /root
COPY . .
RUN apt update
RUN apt -y upgrade
RUN apt -y install apt-utils apt-transport-https ca-certificates
RUN apt -y install wget gpg