Skip to content

Instantly share code, notes, and snippets.

View vegerot's full-sized avatar
💭
Hey 👋

Max Coplan vegerot

💭
Hey 👋
View GitHub Profile
@vegerot
vegerot / git-deployment.md
Created April 4, 2019 00:46 — forked from noelboss/git-deployment.md
Simple automated GIT Deployment using Hooks

Simple automated GIT Deployment using GIT Hooks

Here are the simple steps needed to create a deployment from your local GIT repository to a server based on this in-depth tutorial.

How it works

You are developing in a working-copy on your local machine, lets say on the master branch. Most of the time, people would push code to a remote server like github.com or gitlab.com and pull or export it to a production server. Or you use a service like deepl.io to act upon a Web-Hook that's triggered that service.

I[12:49:03.309] clangd version 9.0.0 (tags/RELEASE_900/final)
I[12:49:03.309] Working directory: /usr/local/Cellar/llvm
I[12:49:03.309] argv[0]: /Users/maxcoplan/.vim/bundle/YouCompleteMe/third_party/ycmd/third_party/clangd/output/bin/clangd
I[12:49:03.309] argv[1]: -log=verbose
I[12:49:03.309] argv[2]: -pretty
I[12:49:03.309] argv[3]: -header-insertion-decorators=0
I[12:49:03.309] argv[4]: -resource-dir=/Users/maxcoplan/.vim/bundle/YouCompleteMe/third_party/ycmd/third_party/clang/lib/clang/9.0.0
I[12:49:03.309] argv[5]: -limit-results=500
I[12:49:03.309] Starting LSP over stdin/stdout
V[12:49:03.310] <<< {
@vegerot
vegerot / original.sh
Created December 3, 2019 04:03
original filesystem
label: dos
label-id: 0x000efb19
device: /dev/sdc
unit: sectors
/dev/sdc1 : start= 2048, size= 4612096, type=e
/dev/sdc2 : start= 4615235, size= 25370624, type=5
/dev/sdc3 : start= 29986816, size= 62914560, type=83, bootable
/dev/sdc5 : start= 4620288, size= 65534, type=83
/dev/sdc6 : start= 4685824, size= 524286, type=c
@vegerot
vegerot / modified.sh
Created December 3, 2019 04:05
dangerous partition table
label: dos
label-id: 0x000efb19
device: /dev/sdc
unit: sectors
/dev/sdc1 : start= 2048, size= 4612096, type=e
/dev/sdc2 : start= 4615235, size= 63514560, type=5
/dev/sdc5 : start= 4620288, size= 65534, type=83
/dev/sdc6 : start= 4685824, size= 524286, type=c
/dev/sdc7 : start= 5210112, size= 24773700, type=83
@vegerot
vegerot / new.sh
Created December 8, 2019 21:30
Modified partition table
label: dos
label-id: 0x000efb19
device: /dev/sdc
unit: sectors
/dev/sdc1 : start= 2048, size= 4612096, type=e
/dev/sdc2 : start= 4614144, size= 188287232, type=5
/dev/sdc5 : start= 4620288, size= 65534, type=83
/dev/sdc6 : start= 4685824, size= 524286, type=c
/dev/sdc7 : start= 5210112, size= 24773700, type=83
@vegerot
vegerot / times.js
Created January 16, 2020 02:45
How do ticks work
#!/usr/bin/env node
// @flow
var start = Date.now();
var timer = setTimeout(() => {
console.log('done');
console.log(Date.now() - start);
}, 1);
var timer2 = setTimeout(() => {
console.log(timer);
console.log(Date.now() - start);
* In the future, they plan on changing Deno to prompt the user for more permissions instead of crashing, like how browsers do it. Source: https://github.com/thechangelog/transcripts/blob/master/podcast/the-changelog-443.md#:~:text=Ryan%20Dahl%3A%20Yeah%2C%20I%20should,you%20opt%20into%20additional%20privileges
** Sources: https://github.com/thechangelog/transcripts/blob/master/podcast/the-changelog-443.md#:~:text=Ryan%20Dahl%3A%20%5B00%3A32,you%20ever%20get%20started , https://github.com/thechangelog/transcripts/blob/master/podcast/the-changelog-443.md#:~:text=Adam%20Stacoviak%3A%20This,you%20say%20that%3F
*** Source: https://github.com/thechangelog/transcripts/blob/master/podcast/the-changelog-443.md#:~:text=Ryan%20Dahl%3A%20This,extension%20to%20JavaScript
I would highly recommend this podcast episode, as it's one of the only podcasts Ryan has ever done https://changelog.com/podcast/443
Surma, this is a really well-researched and well-presented video, and you definitely do mention my points below 👇 , but it wasn't until I listened to this Changelog podcast last week that I realized just how pervasive browser-oriented thinking goes into the Deno design. You made a great video 💯 🙂
Really enjoyed this. You mention this in the video, but something I didn't realize until last week is Deno's core philosophy of: "Stick to existing web standards", and how that impacts all the decisions they make.
So they chose that import syntax because that's how the web does it, they chose the security model of the Deno process to make it similar to the web*, etc.. The reason that Deno doesn't introduce more file formats or have specific config files is because that's how the web works**. The main exception to this is TypeScript, which Ryan Dahl has actually said is his biggest REGRET about Deno***!
* In the future, they plan on changing Deno to prompt the user for more permissions instead of crashing,
@vegerot
vegerot / zoom.ts
Last active October 1, 2022 03:40
Notify you when someone in a Zoom call says something
/*
Steps to use this:
1. Join a Zoom call from the web
2. Enable Live Transcription
3. Open the console (Cmd + Opt + J)
4. Paste this code into the console
*/
// In order to be able to paste this script multiple times in the console,
@vegerot
vegerot / playground.html
Last active November 5, 2022 05:50
JavaScript Playground
<html>
<body>
<code>
<script type="module" contenteditable>
console.log("hello, world!");
const script = document.querySelector("script");
script.addEventListener("input", function runScript(e) {
eval(e.target.innerHTML);
script.removeEventListener("input", runScript);
});