Skip to content

Instantly share code, notes, and snippets.

View creimers's full-sized avatar
🏠
Working from a great place

C Reimers creimers

🏠
Working from a great place
View GitHub Profile
sudo apt-get update
sudo apt-get upgrade
sudo apt-get install autoconf libtool libdaemon-dev libasound2-dev libpopt-dev libconfig-dev -y
sudo apt-get install avahi-daemon libavahi-client-dev -y
sudo apt-get install libssl-dev -y
cd ~
git clone https://github.com/mikebrady/shairport-sync.git
@creimers
creimers / example.jsx
Created April 24, 2020 14:43
react render props children
const Ding = (props) => {
const {children} = props
return children(
{text: "dong"}
)
}
const Dong = () => (
<Ding>
{({text}) => (
convert *.JPG -resize "600^>" -gravity center -crop 600x600+0+0 -strip -set filename:area "%t" '%[filename:area]-thumb.JPG'
@creimers
creimers / apollo-angular1-query.js
Created March 7, 2017 14:35
a basic example of how to use an apollo query with variables and angular 1
queryJobs() {
const jobQuery = gql`
query($city: String) {
jobs(city: $city){
id
title
teaser
imageSmall
published
}

Keybase proof

I hereby claim:

  • I am creimers on github.
  • I am creimers (https://keybase.io/creimers) on keybase.
  • I have a public key ASCSLxFxDoHughnws28kEUBu6qzUYHz6in3xXeQKJsvRmgo

To claim this, I am signing this object:

@creimers
creimers / lazy.js
Created December 9, 2016 13:11
Lazy loading with angular1 component router and webpack code split
class lazyAppCtrl {
constructor($q, $rootRouter, $ocLazyLoad) {
this.$q = $q
this.$rootRouter = $rootRouter
this.$ocLazyLoad = $ocLazyLoad
this.$rootRouter.config([
{
path: '/lazy',
name: 'Lazy',
RelatedObjectDoesNotExist: Page has no publisher_draft.
from cms.models import Page
pages = Page.objects.all()
ids = [page.id for page in pages if page.get_absolute_url()=='/mitmachen/das-kannst-du-tun/']
one = ids[0]
two = ids[1]
one.publisher_public = two
agrs `ag -l search_string`
:argdo %s/cmd/command/ge | update
pip install -e 'git+https://github.com/creimers/cmsplugin_seocheck.git#egg=cmsplugin_seocheck'
@creimers
creimers / gist:04143c1b2e7f7dec5033
Created April 15, 2015 11:00
django database from venv
if 'DATABASE_URL' not in os.environ:
os.environ['DATABASE_URL'] = 'sqlite:///'+ BASE_DIR + '/project.db'
import dj_database_url
DATABASES = {
'default':
dj_database_url.config()
}