- https://duffn.dev
- @duffn@fosstodon.org
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
DROP TABLE if exists d_date; | |
CREATE TABLE d_date | |
( | |
date_dim_id INT NOT NULL, | |
date_actual DATE NOT NULL, | |
epoch BIGINT NOT NULL, | |
day_suffix VARCHAR(4) NOT NULL, | |
day_name VARCHAR(9) NOT NULL, | |
day_of_week INT NOT NULL, |
This file has been truncated, but you can view the full file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Eleventy:cmd command: eleventy { _: [], quiet: null, version: false, watch: false, dryrun: false, help: false, serve: false, incremental: false, 'ignore-initial': false } +0ms | |
Eleventy:EventBus Setting up global EventBus. +0ms | |
Eleventy:UserConfig Resetting EleventyConfig to initial values. +0ms | |
Eleventy:UserConfig Adding universal filter 'slug' +2ms | |
Eleventy:UserConfig Adding universal filter 'slugify' +0ms | |
Eleventy:UserConfig Adding universal filter 'url' +0ms | |
Eleventy:UserConfig Adding universal filter 'log' +0ms | |
Eleventy:UserConfig Adding universal filter 'serverlessUrl' +0ms | |
Eleventy:UserConfig Adding universal filter 'getCollectionItemIndex' +0ms | |
Eleventy:UserConfig Adding universal filter 'getCollectionItem' +0ms |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apiVersion: v1 | |
kind: ServiceAccount | |
metadata: | |
labels: | |
k8s-app: metrics-server | |
name: metrics-server | |
namespace: kube-system | |
--- | |
apiVersion: rbac.authorization.k8s.io/v1 | |
kind: ClusterRole |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[ | |
{ | |
"name": "Leia Organa", | |
"profession": "Princess" | |
}, | |
{ | |
"name": " Luke Skywalker", | |
"profession": "Jedi Knight" | |
}, | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# https://thebrainfiles.wearebrain.com/prettify-ecto-errors-b85e9a7977f6 | |
defmodule EdgeBuilder.EctoHelper do | |
@moduledoc """ | |
Provides helper functions | |
""" | |
@doc """ | |
Prettifies changeset error messages. | |
By default `changeset.errors` returns errors as keyword list, where key is name of the field |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export STAGING=staging | |
export MASTER=master | |
export REPO=https://github.com/yourorg/yourrepo/pull/ | |
git log --oneline $(git log -n 1 --pretty=format:"%H" $STAGING)...$(git log -n 1 --pretty=format:"%H" $MASTER) | grep -E '#[0-9]+' | gawk -v REPO="$REPO" 'match($0, /#([0-9]+)/, arr) {$1=""; print substr($0,2) "\t" REPO arr[1]}' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Update the PeriodicFolderTrigger of each job inside of a Cloudbees folder. | |
// Useful for updating individual repos as you cannot do this through the UI. | |
// https://stackoverflow.com/questions/57077851/jenkins-github-plugin-scan-organization-triggers | |
import com.cloudbees.hudson.plugins.folder.computed.PeriodicFolderTrigger | |
import jenkins.model.Jenkins | |
import jenkins.branch.OrganizationFolder | |
println "Multibranch Items\n-------" | |
Jenkins.instance.getAllItems(org.jenkinsci.plugins.workflow.multibranch.WorkflowMultiBranchProject.class).each { it.triggers | |
.findAll { k,v -> v instanceof com.cloudbees.hudson.plugins.folder.computed.PeriodicFolderTrigger } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# MySQL in Docker | |
docker run --name=mysql01 -p 3306:3306 mysql/mysql-server:latest | |
docker exec -it mysql01 mysql -uroot -p | |
# Enter the one time password generated from the docker run command | |
# and then change the root password | |
ALTER USER 'root'@'localhost' IDENTIFIED BY 'mypassword'; | |
# Create a user with your host IP address so it can connect from Buffalo | |
# outside the container | |
create user 'root'@'172.17.0.1' with password 'mypassword'; | |
GRANT ALL PRIVILEGES ON * . * TO 'root'@'172.17.0.1'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.blob-code-inner { | |
font-family: 'Hack', Menlo, monospace; | |
font-size: 16px; | |
} | |
.blob-code-inner span.pl-k { | |
color: #FF79C6; | |
} | |
.blob-code-inner span.pl-c1, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Authorization with django-graphene | |
# using django-jwt-auth==0.0.2 | |
from django.conf.urls import url | |
from django.views.decorators.csrf import csrf_exempt | |
from graphene_django.views import GraphQLView | |
from jwt_auth.mixins import JSONWebTokenAuthMixin | |
class AuthGraphQLView(JSONWebTokenAuthMixin, GraphQLView): |
NewerOlder