Skip to content

Instantly share code, notes, and snippets.

View jcallin's full-sized avatar
💭
🧙🏽‍♂️

Julian Callin jcallin

💭
🧙🏽‍♂️
View GitHub Profile
@jcallin
jcallin / apline-s3fs-install.sh
Last active May 23, 2023 09:19
Install s3fs on Alpine Linux
apk update && apk add git
apk add build-base automake autoconf libxml fuse-dev curl-dev
git clone https://github.com/s3fs-fuse/s3fs-fuse.git
cd s3fs-fuse
./autogen.sh
./configure
make
make install
@jcallin
jcallin / git-merge.sh
Last active December 28, 2018 17:09
Optimal git merge workflow
# We will squash into master, but push the result back to our feature branch. This way we can easily open a PR for the squashed commit.
git checkout branch
# Set HEAD back to origin/master so we can merge to the correct place on remote, but keep local changes to master intact if we have them
git reset --hard origin/master
# Merge our branch to current head (origin/master set from last command). Squash to one commit.
git merge --squash origin/branch
# In the merge commit, include all commits to the branch
git commit --no-edit
# Push the squashed commit on branch so we can open a PR
@jcallin
jcallin / pagescroller.js
Created March 24, 2019 08:11
Page scroller with react-page-scroller
import React, { Component } from 'react';
import { Pager } from "react-bootstrap";
import ReactPageScroller from 'react-page-scroller';
import NavBar from '../src/components/NavBar'
import FirstPage from '../src/components/pages/FirstPage';
import SecondPage from '../src/components/pages/SecondPage';
class App extends Component {
@jcallin
jcallin / RetryTest.scala
Created February 28, 2020 01:40
ScalaTest Retry a test over and over
import org.scalatest.tagobjects.Retryable
import org.scalatest.{ Canceled, Failed, Outcome, Retries, Succeeded }
class SomeTestSuite extends FunSpec with Retries {
val retries = 1000
override def withFixture(test: NoArgTest): Outcome = {
if (isRetryable(test)) withFixture(test, retries) else super.withFixture(test)
}