Skip to content

Instantly share code, notes, and snippets.

View idkjs's full-sized avatar

Alain Armand idkjs

View GitHub Profile
@dabit3
dabit3 / App.js
Created March 20, 2020 19:47
Expo + Amplify DataStore App
import Amplify from '@aws-amplify/core'
import config from './aws-exports'
Amplify.configure(config)
import React, { useState, useEffect } from 'react'
import { Text, View, TextInput, Button } from 'react-native'
import { DataStore } from '@aws-amplify/datastore'
import { Message} from './src/models'
const initialState = { color: 'black', title: '' }
open Belt;
[@bs.deriving abstract]
type queryConfig('data, 'key, 'fnParamsFilter) = {
[@bs.optional]
retry: int,
[@bs.optional]
retryDelay: int,
[@bs.optional]
initialData: unit => 'data,
@kentcdodds
kentcdodds / autofill-feedback-email.js
Last active April 19, 2023 04:59
I use this to automatically fill in email addresses in feedback forms throughout workshop material
#!/usr/bin/env node
const path = require('path')
const inquirer = require('inquirer')
const replace = require('replace-in-file')
const isCI = require('is-ci')
const spawn = require('cross-spawn')
const fileGlob = process.argv[2] || 'src/**/*.*'
const files = path.isAbsolute(fileGlob)
@wokalski
wokalski / Form.re
Last active August 23, 2020 05:58
sensible forms for reason-react
type validatorData('a) = {
value: 'a,
isTouched: bool,
submitted: bool,
};
type shouldDisplayError('error) = {
error: 'error,
isTouched: bool,
submitted: bool,
@sbinlondon
sbinlondon / synthwaveglow.md
Last active February 22, 2024 22:40
Get the synth wave glow theme working for VS Code on Mac

Get the synth wave glow working for VS Code on Mac

These notes are pretty much the same steps as the two extensions list, it's just that I had to collate them together because neither seems to list it fully in the proper order.

  1. Install Synthwave ’84/Synthwave + Fluoromachine theme on VS Code (I used the Fluoromachine one)

  2. Install Custom CSS and JS Loader

  3. Command + Shift + P to open command palette > "Preferences: Open settings (JSON)"

@typebrook
typebrook / README.md
Last active May 10, 2024 18:57
A bash script for gist management #bash #gist
@weblogix
weblogix / drevo-caliber.json
Last active May 2, 2021 14:46
[Karabiner-Elements] for DREVO Calibur 71-key Keyboard #mac #keyboard #karabiner
{
"title": "DREVO Calibur 71-key Keyboard",
"rules": [
{
"description": "Set ESC to grave_accent_and_tilde",
"manipulators": [
{
"type": "basic",
"from": {
"key_code": "escape",
@ttscoff
ttscoff / tm.fish
Created December 17, 2019 08:49
Fish completion for tm.bash
# ~/.config/fish/completions/tm.fish
function __tm_has_no_args
set -l cmd (commandline -opc)
echo $cmd
return (test (count $cmd) -eq 1)
end
function __tm_has_windows
set -l cmd (commandline -opc)
set -l res (tmux list-windows -t $cmd[-1] 2>/dev/null >/dev/null)
@ThomasBrittain
ThomasBrittain / Test.ml
Last active December 12, 2019 01:31
Time Series
#use "Utils.ml";;
#use "TimeSeriesWithRecords.ml";;
#use "TimeSeriesWithModules.ml";;
let test_data =
[|
{date = {year = 2019; month = Jan; day = 1}; time = None; value = Some 1.0};
{date = {year = 2019; month = Jan; day = 2}; time = None; value = Some 2.0};
{date = {year = 2019; month = Jan; day = 4}; time = None; value = None};
{date = {year = 2019; month = Jan; day = 6}; time = None; value = Some 3.0};
[@bs.module] external bent('headers, 'response) : (
~method: @bs.string] [
| `GET
| `POST
| `PUT
| `DELETE
],
~format: [@bs.string] [
| `string
| `buffer