Skip to content

Instantly share code, notes, and snippets.

View shicholas's full-sized avatar
🏁
small victories add up

nick shicholas

🏁
small victories add up
  • Earth
View GitHub Profile
@thewisenerd
thewisenerd / dont-run-this-lmao.sh
Created November 16, 2022 21:34
installing facebook prophet on macOS arm64
brew install [email protected]
python3.11 -m pip install cmdstanpy
python3.11 -m pip install prophet # this should work ? if it dont, good luck lmao
# at this point, you might get an error
# RuntimeError: Error during optimization! Command '/opt/homebrew/lib/python3.11/site-packages/prophet/stan_model/prophet_model.bin
# dyld[71677]: Library not loaded: '@rpath/libtbb.dylib'
cd /opt/homebrew/lib/python3.11/site-packages/prophet/stan_model
install_name_tool -add_rpath @executable_path/cmdstan-2.26.1/stan/lib/stan_math/lib/tbb prophet_model.bin
# 'Prophet.fit' should no longer throw a fit haha
@tingwei628
tingwei628 / docker-compose.yml
Created October 27, 2019 15:20
use postgresql and pgAdmin in docker
version: "3.4"
services:
pgAdmin:
restart: always
image: dpage/pgadmin4
ports:
- "8000:80"
environment:
PGADMIN_DEFAULT_EMAIL: [email protected]
@Mikhus
Mikhus / gqlts.js
Last active October 29, 2019 21:56
GraphQL schema to TypeScript definitions. Usage: ./gqlts.js /path/to/schema.graphql > /path/to/schema.d.ts
#!/usr/bin/env node
/*!
* ISC License
*
* Copyright (c) 2019, Mykhailo Stadnyk <[email protected]>
*
* Permission to use, copy, modify, and/or distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
@rbalicki2
rbalicki2 / Resolve.jsx
Created November 14, 2018 18:24
Resolve.jsx (the one in use)
import { Component } from 'react';
import PropTypes from 'prop-types';
/**
* Resolve
*
* This is the workhorse of how Jetty does async.
* It accepts a promise, and renders one of four render props:
* - before
* - pending
@clarkdave
clarkdave / createPages.ts
Created April 15, 2018 13:11
TypeScript + Gatsby node API
import { resolve } from 'path'
import { GatsbyCreatePages } from './types'
const createPages: GatsbyCreatePages = async ({
graphql,
boundActionCreators,
}) => {
const { createPage } = boundActionCreators
const allMarkdown = await graphql(`
const Model = require('sequelize').Model;
class User extends Model {
columns: {
id: {
autoIncrement: true,
primaryKey: true,
type: Model.DataTypes.INTEGER(10)
},
@ahmetb
ahmetb / gcrgc.sh
Last active October 3, 2024 14:32
Script to clean up Google Container Registry images pushed before a particular date
#!/bin/bash
# Copyright © 2017 Google Inc.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
@juhaelee
juhaelee / react-typescript.md
Last active May 28, 2024 17:41
React + Typescript Cheatsheet

React + Typescript Cheatsheet

Setup

If you use atom... download & install the following packages:

What are Typescript type definition files? (*.d.ts)

@iki
iki / gulpfile.js
Last active January 18, 2019 16:38
generating API documentation from RAML specification using raml2html in gulp
'use strict';
var gulp = require('gulp');
var path = require('path');
var CWD = path.resolve('.');
var API_SPEC = path.resolve(CWD, '../api/api.raml');
var API_DEST = path.resolve(CWD, '../server/static/docs/api');
var API_HTML = 'index.html';
@edouard-lopez
edouard-lopez / libsass-install.bash
Last active October 17, 2019 17:17
Installing/Compiling libsass and sassc on Ubuntu 14.04+/Linux Mint 17+ (needed by node-sass)
# Based on https://github.com/sass/libsass/wiki/Building-with-autotools
# Install dependencies
apt-get install automake libtool
# Fetch sources
git clone https://github.com/sass/libsass.git
git clone https://github.com/sass/sassc.git libsass/sassc
# Create configure script