Skip to content

Instantly share code, notes, and snippets.

View y-ack's full-sized avatar
♻️
brain damage per second

ywy y-ack

♻️
brain damage per second
View GitHub Profile
@y-ack
y-ack / 2018-04-11.ps1
Created April 14, 2018 18:22
script everyday
#PowerShell: convert strings copied as integers back to byte-characters
function convertchars([uint32]$a){return [bitconverter]::GetBytes([uint32]$a) | %{[char]$_}}
@y-ack
y-ack / brak.PRG
Created May 8, 2018 01:04
3-character language made for bracket challenge @12Me21 @ajc2
DIM STACK0[0],STACK1[0]
DIM STACK2[0],STACK3[0]
DIM STACK4[0],STACK5[0]
DIM STACK6[0],STACK7[0]
DIM STACK8[0]
'Registers
VAR r0%, r1%, r2%, r3%, r4%, r5%, r6%
VAR r7% 'pc
VAR NUMERIC% 'special fake register for numeric literals
VAR CYCLES%
code (hex)instruction
36CHKLABEL
37CHKCALL
38CHKVAR
39???
3A???
3B???
3CPOP
3DSHIFT
Add-Type @"
using System;
using System.Runtime.InteropServices;
public class Win32 {
[DllImport("user32.dll")]
public static extern void mouse_event(int flags, int dx, int dy, int cButtons, int info);
[DllImport("user32.dll")]
[return: MarshalAs(UnmanagedType.Bool)]
public static extern bool GetWindowRect(IntPtr hWnd, out RECT lpRect);
[DllImport("user32.dll")]
@y-ack
y-ack / block.org
Last active December 1, 2018 20:48
#+BEGIN_COMMENT
#+BEGIN_SRC diff
-block 1
#+END_SRC
#+BEGIN_SRC diff
+block 2
#+END_SRC
#+END_COMMENT
root = true
[*]
indent_style = tab
indent_size = 2
@y-ack
y-ack / test.creole
Last active December 3, 2018 22:52
PRINT [value_1 [, ...][; ...]]

{{{ haskell PRINT [value_1 [, ...][; ...]] }}}

{{{ .haskell PRINT [value_1 [, ...][; ...]]

@y-ack
y-ack / markup.org
Last active December 4, 2018 22:18

Goals/Motivations

Every markup language sucks

  • HTML is unambiguous but painful to type
  • Markdown syntax is bad (links are backwards)
  • Others supported on github don’t suit our needs

In general markups have one or more of four problems:

  • Missing features [1]
  • Bad syntax [2]
  • Bad implementations [3]
  • Evil [4]
@y-ack
y-ack / instruction sorting.org
Created December 7, 2018 04:49
The decided categories placement for instructions
BREAKControl Flow
CALLControl Flow
COMMONControl Flow/Functions
CONTINUEControl Flow
DATADATA?
DECMath?
DEFControl Flow/Functions
DIMVariable?
ELSEpart of IF page
ELSEIFpart of IF page
@y-ack
y-ack / IMPORTANT.org
Last active March 11, 2019 05:53
Necessary Study For Being a Clever Youkai

Statistics

Introductory statistics at minimum. p-values, different significance tests, precision vs. accuracy, sampling and bias.

Basic Computer Skills

Keyboarding

Speed and use of keyboard shortcuts to the point that a mouse is unnecessary for 70%+ of tasks

UNIX

Understand filesystem, ability to navigate a unix shell. https://en.wikipedia.org/wiki/List_of_Unix_commands

  • ls, cd, pwd, tail, tee, strings, rm, patch, nohup, more, mkdir, man, ls, ln, kill, grep, find, fg, echo, du, diff, df, dd, date, cut, cp, chown, chmod, chgrp, cd, cat, bg, alias, sudo, umount
  • extra credit: sed/awk, emacs/vi, curl, which, mkfs, lsblk, blkid