Skip to content

Instantly share code, notes, and snippets.

View bobiko's full-sized avatar
👋
coding, biking and living

bobiko bobiko

👋
coding, biking and living
View GitHub Profile
@HynekS
HynekS / gatsby-browser.js
Last active April 20, 2020 10:34 — forked from azamatsmith/gatsby-browser.js
Adding Redux to Gatsby - with devtools and redux-thunk
import React from 'react';
import { Provider } from 'react-redux';
import { applyMiddleware, compose, createStore } from 'redux';
import thunk from 'redux-thunk';
import rootReducer from './src/reducers';
const loadDevTools = () =>
process.env.NODE_ENV === 'development' && typeof window !== 'undefined' && window.devToolsExtension
? window.__REDUX_DEVTOOLS_EXTENSION__ &&
window.__REDUX_DEVTOOLS_EXTENSION__()
@ThomasLeister
ThomasLeister / mastodon-tootctl-media-purge.txt
Created February 21, 2019 19:07
How to automatically remove cached media files older that 7 days from your Mastodon instance
This is how to automatically delete cached image previews from your Mastodon instance if they are older than 7 days.
Log in as your "mastodon" User or log in as root and then change to the "mastodon" user, who runs Mastodon:
# su - mastodon
Open crontab:
$ crontab -e
... and add these lines to your crontab:
@mojaray2k
mojaray2k / jsbin.burut.html
Last active September 19, 2023 15:42
CSS only custom-styled select Todd Parker - Filament Group Inc. How this works: This styles a native select consistently cross-platform with only minimal CSS. The native select is then styled so it is essentially invisible (no appearance, border, bg) leaving only the select's text visible. There is a wrapper around the select that has the majori…
<html>
<head>
<title>Select styles with CSS only</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<style>
body {
background-color: #fff;
font-family: helvetica, sans-serif;
margin: 4% 10%
}
module.exports = function(grunt) {
// 1. All configuration goes here
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
sass: {
dist: {
options: {
loadPath: require('node-bourbon').includePaths,
style: 'compressed'
},
{
"name": "Bourbon Test",
"version": "1.0.0",
"repository": "",
"devDependencies": {
"node-bourbon": "~1.0.0",
"grunt": "~0.4.4",
"grunt-contrib-sass": "~0.7.3"
}
}