Skip to content

Instantly share code, notes, and snippets.

@herr-vogel
herr-vogel / material-ui-next-js-button.js
Last active November 16, 2021 10:14
Using Material-UI Button with Next.js Link
import React from 'react'
import Link from 'next/link'
import Button from '@material-ui/core/Button'
const ButtonLink = ({ className, href, hrefAs, children, prefetch }) => (
<Link href={href} as={hrefAs} prefetch>
<a className={className}>
{children}
</a>
</Link>
@dlaroe
dlaroe / CRS-4x12-ortholinear-layout.kbd.json
Last active October 13, 2023 16:45
CRS 4x12 ortholinear layout
[
{
"name": "CRS 4x12 ortholinear layout",
"author": "DRL https://github.com/qmk/qmk_firmware/tree/master/layouts/community/ortho_4x12/crs/",
"plate": false
},
[
{
"c": "#e8b0b0",
"a": 7
@bastman
bastman / docker-cleanup-resources.md
Created March 31, 2016 05:55
docker cleanup guide: containers, images, volumes, networks

Docker - How to cleanup (unused) resources

Once in a while, you may need to cleanup resources (containers, volumes, images, networks) ...

delete volumes

// see: https://github.com/chadoe/docker-cleanup-volumes

$ docker volume rm $(docker volume ls -qf dangling=true)

$ docker volume ls -qf dangling=true | xargs -r docker volume rm

@mig5
mig5 / deploy.yml
Last active August 9, 2016 07:21
Ansible playbook to deploy Drupal
---
- hosts: all
gather_facts: no
tasks:
- name: Backup database
shell: "{{ item }}"
with_items:
- mkdir -p ~jenkins/dbbackups
- drush @{{ shortname }}_{{ env }} sql-dump --skip-tables-key=common | gzip > ~jenkins/dbbackups/{{ shortname }}_{{ env }}_prior_to_{{ build }}.sql.gz
@acdha
acdha / convert-subtitles.py
Last active July 29, 2016 19:39
Video caption conversion script using the PBS pycaption library
#!/usr/bin/env python
# encoding: utf-8
"""Convert caption files to different formats
One or more caption files will be converted to the specified output format, saved next to the input file
Requires the pycaption library from PBS: https://pypi.python.org/pypi/pycaption/
"""
from __future__ import absolute_import, print_function, unicode_literals