Skip to content

Instantly share code, notes, and snippets.

@jtalmi
jtalmi / dbt_linter.py
Last active March 15, 2022 20:41
dbt linter -- check for unique/not_null tests and description/columns
#!/usr/bin/env python3
"""
CI script to check:
1. Models have both a unique and not_null test.
2. Models have a description and columns (i.e. a schema.yml entry)
"""
import json
import logging
import os
import subprocess
@varyonic
varyonic / Dockerfile
Created June 10, 2016 14:14
Dockerfile with chromedriver
# See https://codeship.com/documentation/docker/browser-testing/
FROM myapp:base
# We need wget to set up the PPA and xvfb to have a virtual screen and unzip to install the Chromedriver
RUN apt-get install -y wget xvfb unzip
# Set up the Chrome PPA
RUN wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add -
RUN echo "deb http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google.list
@AndrewRadev
AndrewRadev / ember-projections.json
Last active May 6, 2021 17:47
A `.projections.json` file that can be used with vim-projectionist for navigating ember.js projects
{
"app/initializers/*.js": {
"type": "initializer"
},
"app/models/*.js": {
"type": "model",
"alternate": "app/adapters/{}.js",
},
"app/adapters/*.js": {
"type": "adapter",
@bsoule
bsoule / spec_helper.rb
Created November 18, 2014 05:21
Today Stripe dropped support for SSLv3 protocol. We're using an older version of PhantomJS in our specs, which defaults to sslv3, so this broke a swath of the Beeminder test suite. Here's the fix for anyone else with PhantomJS tests that wants to force not-sslv3.
require 'capybara/poltergeist'
Capybara.register_driver :poltergeist do |app|
Capybara::Poltergeist::Driver.new(app, :inspector => true, :js_errors => true, :phantomjs_options => ['--ssl-protocol=tlsv1'])
end
@amatellanes
amatellanes / celery.sh
Last active June 17, 2024 11:03
Celery handy commands
/* Useful celery config.
app = Celery('tasks',
broker='redis://localhost:6379',
backend='redis://localhost:6379')
app.conf.update(
CELERY_TASK_RESULT_EXPIRES=3600,
CELERY_QUEUES=(
Queue('default', routing_key='tasks.#'),
@tuzz
tuzz / github.css
Last active June 5, 2024 02:29
Github Markdown Stylesheet
/*
Copyright (c) 2017 Chris Patuzzo
https://twitter.com/chrispatuzzo
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

tmux cheatsheet

As configured in my dotfiles.

start new:

tmux

start new with session name:

@brajeshwar
brajeshwar / gist:1886227
Created February 22, 2012 17:35 — forked from axelav/gist:1839777
Sublime Text 2 Shortcuts for Mac

Sublime Text 2 – Useful Shortcuts (Mac OS X)

General

⌘T go to file
⌘⌃P go to project
⌘R go to methods
⌃G go to line
⌘KB toggle side bar
⌘⇧P command prompt
@rduplain
rduplain / README.rst
Created February 13, 2011 05:21
Demonstrate use of fixture with Flask-SQLAlchemy and Flask-Testing.

Demonstrate use of fixture with Flask-SQLAlchemy and Flask-Testing. February 13, 2011 Ron DuPlain <ron.duplain@gmail.com>

Post any feedback to: flask@librelist.org

Get this gist:

git clone git://gist.github.com/824472.git Flask-SQLAlchemy-Fixture
cd Flask-SQLAlchemy-Fixture
@zhengjia
zhengjia / capybara cheat sheet
Created June 7, 2010 01:35
capybara cheat sheet
=Navigating=
visit('/projects')
visit(post_comments_path(post))
=Clicking links and buttons=
click_link('id-of-link')
click_link('Link Text')
click_button('Save')
click('Link Text') # Click either a link or a button
click('Button Value')