Skip to content

Instantly share code, notes, and snippets.

View Lulzx's full-sized avatar
:octocat:
Enjoy the ride

Lulzx Lulzx

:octocat:
Enjoy the ride
View GitHub Profile
@Lulzx
Lulzx / bret_victor-reading_list.md
Created June 14, 2019 17:52 — forked from nickloewen/bret_victor-reading_list.md
Bret Victor’s Reading List

This is a plain-text version of Bret Victor’s reading list. It was requested by hf on Hacker News.


Highly recommended things!

This is my five-star list. These are my favorite things in all the world.

A few of these works have had an extraordinary effect on my life or way of thinking. They get a sixth star. ★

@Lulzx
Lulzx / srle.c
Last active August 21, 2019 05:11
#include <stdio.h>
int main() {
char arr[] = "SRRRLLRLRRLLLRE";
int jump = 0, pos = 0;
int len = sizeof(arr)/sizeof(char);
while (pos != len) {
jump += 1;
if (arr[pos + jump] == 'R') {
pos += jump;
#include <stdio.h>
int sumFactors(int n) {
int sum = 0;
for (int i = 1; i < n; i++) {
if (!(n % i)) {
sum += i;
}
}
return sum;
#include <stdio.h>
void check(int matrix, int rows, int columns){
printf("%d", matrix[0][0]);
}
int main(){
int rows, columns, n, matrix[1000][1000];
scanf("%d%d", &rows, &columns);
for(int i = 0; i < rows; i++){
#include <stdio.h>
int main(){
int i;
scanf("%d", &i);
while(i != 1){
printf("%d → ", i);
if(!(i % 2)){
i /= 2;
}
#include <stdio.h>
int count(int l, int r, int n, int m)
{
int count = 0;
for (int i = l; i <= r; i++) {
int sum = 0, x = i, t;
t = (i % m);
while (x != 0) {
sum += x % 10;
@Lulzx
Lulzx / homo_sol-1.md
Created February 2, 2019 15:04
solution for a math problem

Solve ( d^2 y(x))/( dx^2) + y(x) = 0:

Assume a solution will be proportional to e^(λ x) for some constant λ. Substitute y(x) = e^(λ x) into the differential equation: ( d^2 )/( dx^2)(e^(λ x)) + e^(λ x) = 0

Substitute ( d^2 )/( dx^2)(e^(λ x)) = λ^2 e^(λ x): λ^2 e^(λ x) + e^(λ x) = 0

Factor out e^(λ x):

@Lulzx
Lulzx / solus-usb.sh
Created December 14, 2018 11:29
command to flash solus' iso to usb drive
sudo dd if=Solus-3.9999-Budgie.iso of=/dev/sdb bs=1M;sudo sync;sudo eject /dev/sdb
const puppeteer = require('puppeteer');
(async () => {
const browser = await puppeteer.launch()
const page = await browser.newPage()
await page.waitForSelector('.main_wrapper > .form > #form1 > p > #username')
await page.click('.main_wrapper > .form > #form1 > p > #username')
await page.waitForSelector('.main_wrapper > .form > #form1 > p > #password')
await page.click('.main_wrapper > .form > #form1 > p > #password')
@Lulzx
Lulzx / lulz.py
Created November 8, 2018 16:38
kill me
import os
import sys
import signal
import subprocess
currentPID = os.getpid()
if 'pid' not in os.listdir():
with open('pid', mode='w') as f:
print(str(currentPID), file=f)
else: