Skip to content

Instantly share code, notes, and snippets.

View aeksco's full-sized avatar
🚀

Alexander Schwartzberg aeksco

🚀
View GitHub Profile
@aeksco
aeksco / gist:747b11d7b2afddbbc7170ff785118635
Created September 15, 2017 04:20
ubuntu_provision.sh
# Install VirtualBox + Vagrant
sudo echo "deb http://download.virtualbox.org/virtualbox/debian xenial contrib" >> /etc/apt/sources.list
wget -q https://www.virtualbox.org/download/oracle_vbox_2016.asc -O- | sudo apt-key add -
wget -q https://www.virtualbox.org/download/oracle_vbox.asc -O- | sudo apt-key add -
sudo apt-get update
sudo apt-get install -y virtualbox-5.1
sudo apt-get install -y vagrant
@aeksco
aeksco / README.md
Last active March 18, 2018 21:24
Printrbot Start / End GCODE

This is the start and end GCODE I use with my modified Printrbot Simple Metal. The Purge Line GCODE in the start.gcode file may be useful elsewhere.

@aeksco
aeksco / TodoList.tsx
Created July 12, 2019 17:21
React + TypeScript + React.Hooks ToDo List
import * as React from "react";
type Item = {
id: string,
label: string,
done: boolean,
}
const TodoList = () => {
const [newLabel, setNewLabel] = React.useState('');
@aeksco
aeksco / console-log.code-snippets
Last active August 12, 2021 03:10
VsCode Keybindings
{
// Place your global snippets here. Each snippet is defined under a snippet name and has a scope, prefix, body and
// description. Add comma separated ids of the languages where the snippet is applicable in the scope field. If scope
// is left empty or omitted, the snippet gets applied to all languages. The prefix is what is
// used to trigger the snippet and the body will be expanded and inserted. Possible variables are:
// $1, $2 for tab stops, $0 for the final cursor position, and ${1:label}, ${2:another} for placeholders.
// Placeholders with the same ids are connected.
// Example:
"JS console.log()": {
"scope": "javascript,typescript,typescriptreact",
@aeksco
aeksco / CopyToClipboard.tsx
Created April 15, 2022 22:54
Simple CopyToClipboard React Component + Hook
import * as React from "react";
// // // //
/**
* Exposes navigator.writeText via React hook with optional callback
*/
export function useCopyToClipboard(
callback?: () => void
): [(textToCopy: string) => void] {