Skip to content

Instantly share code, notes, and snippets.

View mhaligowski's full-sized avatar
🎯
Focusing

Mateusz Haligowski mhaligowski

🎯
Focusing
  • gradient.ai
  • Seattle, WA
  • 08:20 (UTC -07:00)
View GitHub Profile
@mhaligowski
mhaligowski / index.js
Created October 6, 2023 20:13
ESM example with @gradientai/nodejs-sdk
import ora from "ora";
import { Gradient } from "@gradientai/nodejs-sdk";
const spinner = ora("").start();
async function run() {
spinner.start("Creating a new Gradient client");
const gradient = new Gradient({});
spinner.stopAndPersist({
text: "Gradient client created successfully",
import java.util.Random;
import java.util.*;
public class InputRandomGame {
public static void main(String[] args) {
intro();
gameMechanic();
ask();
}
public static void ask() {
@mhaligowski
mhaligowski / README
Created May 30, 2021 20:24
This is what happens with help when using yargs with `commandDir`.
Example project
@mhaligowski
mhaligowski / packer.json
Created July 6, 2018 05:34
Prepare VirtualBox VM (+Vagrant) with WordPress preinstalled
{
"_comment": "Build with `packer build ubuntu.json`",
"builders": [
{
"boot_command": [
"{{ user `boot_command_prefix` }}",
"/install/vmlinuz noapic ",
"initrd=/install/initrd.gz ",
"file=/floppy/{{ user `preseed` }} ",
"debian-installer={{ user `locale` }} auto locale={{ user `locale` }} kbd-chooser/method=us ",
@mhaligowski
mhaligowski / Monster.java
Created June 2, 2017 04:43
AssertJ collections example
public class Monster {
private String id;
private String name;
public Monster(final String id, final String name) {
this.id = id;
this.name = name;
}
runtime: python27
api_version: 1
threadsafe: true
handlers:
- url: /.*
script: main.app
@mhaligowski
mhaligowski / function.js
Created May 16, 2017 04:23
Handling with both Google Cloud Functions and Express
exports.hello = require('./hello');
@mhaligowski
mhaligowski / ScopesModule.java
Created March 12, 2017 22:27
Super simple Scope in Guice
import com.google.inject.*;
import javax.inject.Inject;
import java.lang.annotation.Retention;
import static java.lang.annotation.RetentionPolicy.RUNTIME;
@ScopeAnnotation
@Retention(RUNTIME)
@interface NameScoped {
@mhaligowski
mhaligowski / Gemfile
Last active August 29, 2015 14:03
rakefile for asciidoctor
source 'https://rubygems.org'
gem 'asciidoctor'
gem 'tilt'
gem 'haml'
gem 'rake'
@mhaligowski
mhaligowski / pl.json
Last active April 2, 2019 07:39
Poland TopoJSON
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.