Skip to content

Instantly share code, notes, and snippets.

View kokobd's full-sized avatar

Kobayashi kokobd

  • Quito, Ecuador
  • 02:04 (UTC -05:00)
View GitHub Profile
@kokobd
kokobd / .gitpod.yml
Last active June 29, 2022 03:06
Gitpod save directories outside of /workspace
tasks:
- name: Setup
before: |
# Make sure some folders not in /workspace persist between worksapce restarts.
# You may add additional directories to this list.
declare -a CACHE_DIRS=(
$HOME/.local
$HOME/.cabal
$HOME/.stack
$HOME/.ghcup
@kokobd
kokobd / haskell.json
Last active August 10, 2019 05:28
haskell vscode language extension pragma auto-completion
{
"Language Extensions": {
"prefix": "LAN",
"body": [
"{-# LANGUAGE ${1|Haskell98,Haskell2010,Unsafe,Trustworthy,Safe,AllowAmbiguousTypes,NoAllowAmbiguousTypes,AlternativeLayoutRule,NoAlternativeLayoutRule,AlternativeLayoutRuleTransitional,NoAlternativeLayoutRuleTransitional,Arrows,NoArrows,AutoDeriveTypeable,NoAutoDeriveTypeable,BangPatterns,NoBangPatterns,BinaryLiterals,NoBinaryLiterals,CApiFFI,NoCApiFFI,CPP,NoCPP,ConstrainedClassMethods,NoConstrainedClassMethods,ConstraintKinds,NoConstraintKinds,DataKinds,NoDataKinds,DatatypeContexts,NoDatatypeContexts,DefaultSignatures,NoDefaultSignatures,DeriveAnyClass,NoDeriveAnyClass,DeriveDataTypeable,NoDeriveDataTypeable,DeriveFoldable,NoDeriveFoldable,DeriveFunctor,NoDeriveFunctor,DeriveGeneric,NoDeriveGeneric,DeriveLift,NoDeriveLift,DeriveTraversable,NoDeriveTraversable,DerivingStrategies,NoDerivingStrategies,DisambiguateRecordFields,NoDisambiguateRecordFields,DoAndIfThenElse,NoDoAndIfThenElse,DoRec,NoDoRec,DuplicateRecordFields,NoDuplicateRecordFie
#pragma once
#ifdef __JETBRAINS_IDE__
#define __global__
#define KERNEL_CALL2(f, m, n) f
#else
@kokobd
kokobd / shake.hs
Created March 13, 2019 04:01
Shake build file for Latex
#!/usr/bin/env stack
{- stack
script
--resolver lts-13.12
--package shake
-}
import Development.Shake
import Development.Shake.Command
import Development.Shake.FilePath
@kokobd
kokobd / CMakeLists.txt
Created January 3, 2019 13:56
Find module for GTK3
cmake_minimum_required(VERSION 3.13)
project(gtk_demo C)
set(CMAKE_C_STANDARD 99)
set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake ${CMAKE_MODULE_PATH})
find_package(GTK3 REQUIRED)
add_executable(gtk_demo
@kokobd
kokobd / MaterialUI.hs
Created March 2, 2018 14:27
Haskell binding to 'material-ui', a React based library
{-# LANGUAGE OverloadedStrings #-}
{-|
/ Generated for material-ui-v1.0.0-beta.35 /
Wraps 'material-ui', a javascript library that provides Material style
React components. Note that you need to link to the UMD file of 'material-ui'
in your HTML.
For each combinator in this module, the first parameter is the properties,
@kokobd
kokobd / irunner.js
Created February 23, 2018 14:12
Custom irunner.js that enables static file serving for GHCJSi
/*
GHCJSi communication
reads messages from stdin, sends over stderr
*/
var h$GHCJSiRecord = // true ||
!!process.env['GHCJS_RECORD_GHCJSI'];
var h$GHCJSiPort = process.env['GHCJSI_PORT'] || 6400;
@kokobd
kokobd / FXMLUtil.java
Created December 25, 2017 07:05
Load FXML for custom JavaFX component
import javafx.fxml.FXMLLoader;
import javafx.scene.Parent;
import java.io.IOException;
public final class FXMLUtil {
/**
Suppose you want to create a custom component called MyComponent.
You create a class named MyComponent and an FXML file named MyComponent.fxml,