Skip to content

Instantly share code, notes, and snippets.

View jacobzlogar's full-sized avatar
🌴
Working

Jacob Zlogar jacobzlogar

🌴
Working
View GitHub Profile
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>JS Bin</title>
</head>
<body>
<script id="jsbin-javascript">
@jacobzlogar
jacobzlogar / scoop.txt
Last active June 24, 2019 14:42
scoopisms
Feeling great.
Have you guys tried fasting?
Just ran a 5k.
Next year plan to run ultra marathon.
Btw, noise pollution reduces life span.
looks like `Deamon` is a valid word. https://www.urbandictionary.com/define.php?term=Daemon
Anybody tried the carnivorous diet?
If i send an invoice to google/facebook/etc will they accept it?
#! /usr/bin/env sh
# Get the current space and target space index
current_space="$(yabai -m query --spaces --space | jq -re '.index')"
target_space="${1:-${current_space}}"
# Get the target space id so this still works when the space is moved
target_space_id="$(yabai -m query --spaces \
| jq -re ".[] | select(.index == ${target_space}) | .id")"
@jacobzlogar
jacobzlogar / webcad.php
Created January 18, 2021 18:17
webcad scraper
public function handle(Crawler $crawler)
{
$res = Http::withOptions([
'verify' => false,
'debug' => true,
])->get(config('webcad.url'));
$doc = new \DOMDocument();
libxml_use_internal_errors(true);
@jacobzlogar
jacobzlogar / accounts.tsx
Created February 17, 2022 14:44
bad react code
import Input from '../components/input'
import * as React from 'react'
class AccountForm extends React.Component {
name: any;
constructor(props: any) {
super(props);
this.handleNameChange = this.handleNameChange.bind(this);
this.handleAccountSave = this.handleAccountSave.bind(this);
@jacobzlogar
jacobzlogar / code.rs
Last active November 23, 2022 19:50
proto2
use bytes::BytesMut;
use is_prime::*;
use serde::{Deserialize, Serialize};
use serde_json::*;
use std::collections::HashMap;
use std::io;
use std::net::{IpAddr, Ipv4Addr, SocketAddr};
use tokio::io::{AsyncReadExt, AsyncWriteExt, Interest};
use tokio::net::tcp::{ReadHalf, WriteHalf};
use tokio::net::{TcpListener, TcpStream};
[package]
name = "bojo"
version = "0.1.0"
edition = "2018"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies]