Skip to content

Instantly share code, notes, and snippets.

# Example xorg.conf.d snippet that assigns the touchpad driver
# to all touchpads. See xorg.conf.d(5) for more information on
# InputClass.
# DO NOT EDIT THIS FILE, your distribution will likely overwrite
# it when updating. Copy (and rename) this file into
# /etc/X11/xorg.conf.d first.
# Additional options may be added in the form of
# Option "OptionName" "value"
#
Section "InputClass"
@mrshu
mrshu / duckpm.sh
Created February 2, 2012 21:21
node.js packages uploader to duckpan.org
#!/bin/bash
USER=duck
PASS=pass
npm_config__auth=`echo "$USER:$PASS" |base64`
npm --registry https://duckpan.org/duckpan/do/upload publish
# does PUT https://duckpan.org/duckpan/do/upload/mypackage
@mrshu
mrshu / goals.js
Created February 27, 2012 17:22 — forked from Adman/goals
missing }
var goal1 = 0;
var goal2 = 0;
window.scaling1 = 0;
window.scaling2 = 0;
function toggleOnGoal() {
btnStart = document.getElementById("btnStart");
if (btnStart.innerHTML == "Pause") {
$("#time").stopwatch().stopwatch('stop');
@mrshu
mrshu / dabblet.html
Created December 19, 2012 14:20 — forked from anonymous/dabblet.html
Untitled
<html>
<meta charset='utf-8'>
<head>
<title>GCM WebDeveloper website</title>
<link href='http://fonts.googleapis.com/css?family=Titillium+Web' rel='stylesheet' type='text/css'>
<link href='http://fonts.googleapis.com/css?family=Keania+One' rel='stylesheet' type='text/css'>
</head>
<body>
<style>
body {
@mrshu
mrshu / html5-audio.html
Created January 31, 2013 17:25
Simple example of usage of HTML5 audio tag
<!DOCTYPE html>
<html>
<head>
<script>
var player = document.getElementById("player");
player.play();
</script>
</head>
<body>
<audio id="player">
@mrshu
mrshu / athena_dbt.md
Last active November 28, 2018 13:24
AWS Athena `dbt` information sheet
  1. What options are there for connecting to the warehouse? Eg: ODBC, a python module, etc

  2. Is there a consensus around which of the options in #1 is the most featureful/best supported/most mature/etc option?

  • It would most probably be PyAthena, as it does not have any other non-pythonic requirements.
from airflow.models import DAG
from airflow.operators.s3_file_transform_operator import S3FileTransformOperator
from datetime import datetime
with DAG(dag_id='simple_s3_copy',
schedule_interval=None,
start_date=datetime(2019, 6, 7)) as dag:
copy_file_over = S3FileTransformOperator(
task_id='copy_file_over',
class XComEnabledAWSAthenaOperator(AWSAthenaOperator):
def execute(self, context):
super(XComEnabledAWSAthenaOperator, self).execute(context)
# just so that this gets `xcom_push`(ed)
return self.query_execution_id
from airflow.models import DAG
from airflow.contrib.operators.aws_athena_operator import AWSAthenaOperator
from airflow.operators.s3_file_transform_operator import S3FileTransformOperator
from datetime import datetime
class XComEnabledAWSAthenaOperator(AWSAthenaOperator):
def execute(self, context):
super(XComEnabledAWSAthenaOperator, self).execute(context)
# just so that this gets `xcom_push`(ed)
return self.query_execution_id
#!/usr/bin/env python3
import pandas as pd
import sys
pd.read_csv(sys.argv[1]).to_parquet(sys.argv[2])