Skip to content

Instantly share code, notes, and snippets.

View anztrax's full-sized avatar
🏠
Working from home

andrew ananta anztrax

🏠
Working from home
View GitHub Profile
// https://binarysearch.com/problems/Edges-that-Disconnect-the-Graph
import java.util.*;
class Solution {
static class Result {
int lowLink;
boolean isCycle;
Result(int lowLink, boolean isCycle) {
@jherr
jherr / advanced-event-handler.ts
Created May 17, 2021 14:29
Code for No BT TS - Challenge 3
class EventProcessor {
handleEvent(eventName: ..., data: ...): void {
}
addHandler(handler: ...) {
}
getProcessedEvents(): ...[] {
}
}
@blachniet
blachniet / k8s.conf
Created May 21, 2020 03:52
Ansible playbook to install Minikube on a VM with the "none" driver. Add your inventory in a file named `hosts`, then execute the playbook with `ansible-playbook --ask-become-pass -i hosts ./playbook.yml`
net.bridge.bridge-nf-call-ip6tables = 1
net.bridge.bridge-nf-call-iptables = 1
@ExploreHW
ExploreHW / package.json
Last active May 16, 2023 16:19
CKEditor with React and Typescript
"@ckeditor/ckeditor5-build-classic": "^19.0.0",
"@ckeditor/ckeditor5-react": "^2.1.0",
@curran
curran / README.md
Last active November 9, 2023 10:09
United Nations World Population Prospects 2019
@bbudd
bbudd / assets.md
Created June 13, 2019 12:30
Loading static assets using electron-forge v6 and the webpack plugin

I spent a few hours chasing down just how to get my static assets (css, fonts, images) to load in an Electron app built using electron-forge v6 (https://www.electronforge.io/) and its webpack plugin (https://www.electronforge.io/config/plugins/webpack) while in development mode. There really isn't any documentation available online, either in the electron-forge documentation or in places like blogs or gists or stackoverflow. So I thought I'd put it down here.

Step 1

Load CopyWebpackPlugin npm i -D copy-webpack-plugin


Step 2

Use the plugin to move your directories into place.

@vkarpov15
vkarpov15 / index.js
Created April 25, 2019 23:51
Hello, Imports with `package.json`
import test from './test.js';
test();
@jebright
jebright / main.dart
Created April 16, 2019 19:12
Using an Isolate in Flutter
import 'dart:async';
import 'package:flutter/material.dart';
import 'dart:isolate';
void main() => runApp(new MyApp());
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return new MaterialApp(
@giannisp
giannisp / gist:ebaca117ac9e44231421f04e7796d5ca
Last active March 1, 2024 14:39
Upgrade PostgreSQL 9.6.5 to 10.0 using Homebrew (macOS)
After automatically updating Postgres to 10.0 via Homebrew, the pg_ctl start command didn't work.
The error was "The data directory was initialized by PostgreSQL version 9.6, which is not compatible with this version 10.0."
Database files have to be updated before starting the server, here are the steps that had to be followed:
# need to have both 9.6.x and latest 10.0 installed, and keep 10.0 as default
brew unlink postgresql
brew install postgresql@9.6
brew unlink postgresql@9.6
brew link postgresql
@rbq
rbq / docker.yaml
Last active October 19, 2023 11:57
Install Docker CE on Ubuntu using Ansible
---
- hosts: all
tasks:
- name: Install prerequisites for Docker repository
apt:
name: ['apt-transport-https', 'ca-certificates', 'curl', 'gnupg2', 'software-properties-common']
update_cache: yes
- name: Add Docker GPG key
apt_key: