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
COPY vpc FROM '/SOME/PATH/concat' WITH (FORMAT CSV, DELIMITER ' ', NULL '-'); |
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
import bpy | |
# https://blender.stackexchange.com/questions/5281/blender-sets-compute-device-cuda-but-doesnt-use-it-for-actual-render-on-ec2 | |
bpy.context.user_preferences.addons['cycles'].preferences.compute_device_type = 'CUDA' | |
bpy.context.user_preferences.addons['cycles'].preferences.devices[0].use = True | |
bpy.context.scene.cycles.device = 'GPU' | |
bpy.data.scenes["Scene"].render.filepath = "/tmp/output.png" | |
bpy.ops.render.render(write_still=True) |
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
sudo yum -y install freetype freetype-devel libpng-devel | |
sudo yum -y install mesa-libGLU-devel | |
sudo yum -y install libX11-devel mesa-libGL-devel perl-Time-HiRes | |
# Insert any url for Linux 64 bit blender | |
# https://builder.blender.org/download/ | |
wget 'https://builder.blender.org/download/blender-2.78-81d7ff84769-linux-glibc219-x86_64.tar.bz2' | |
tar -jxvf blender*.tar.bz2 |
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
sudo yum update -y | |
# load the latest kernel version, really dont skip this | |
sudo reboot | |
# http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/accelerated-computing-instances.html#install-nvidia-driver | |
sudo yum install -y gcc kernel-devel-`uname -r` | |
wget http://us.download.nvidia.com/XFree86/Linux-x86_64/375.66/NVIDIA-Linux-x86_64-375.66.run | |
sudo /bin/bash ./NVIDIA-Linux-x86_64-375.66.run |
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
require "language/go" | |
class Migrate < Formula | |
desc "Go CLI for database migrations" | |
homepage "https://github.com/mattes/migrate" | |
url "https://github.com/mattes/migrate/archive/v3.0.1.tar.gz" | |
sha256 "c3847f260e283929db8a39d8a0273db2f6c2d96ab3aee2dba7053a83f4b61e22" | |
head "https://github.com/mattes/migrate/archive/master.zip" | |
depends_on "go" => :build |
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
SYSNAME="$(uname)" | |
if [[ "$SYSNAME" == 'Linux' ]]; then | |
echo "Linux" | |
elif [[ "$SYSNAME" == 'Darwin' ]]; then | |
echo "macOS" | |
fi |
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
<?php | |
$result = file_get_contents('http://example.com/submit.php', FALSE, stream_context_create([ | |
'http' => [ | |
'method' => 'POST', | |
'header' => 'Content-type: application/x-www-form-urlencoded', | |
'content' => http_build_query([ | |
'foo' => 'bar', | |
]), | |
], |
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
#!/usr/bin/env bash | |
set -euo pipefail | |
IFS=$'\n\t' | |
git reset . | |
if [[ -e ".git/rebase-merge/interactive" ]]; then | |
git reset HEAD~1 | |
fi |
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
#!/bin/bash | |
set -euo pipefail | |
IFS=$'\n\t' | |
# update master | |
git checkout master | |
git pull --rebase | |
git checkout - | |
# rebase this branch |
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
var Buffer = require('buffer').Buffer; | |
var zlib = require("zlib"); | |
exports.handler = (event, context, callback) => { | |
var rawGzEnc = event.awslogs.data; | |
var rawGz = Buffer.from(rawGzEnc, 'base64'); | |
var raw = zlib.gunzipSync(rawGz).toString(); | |
var data = JSON.parse(raw); | |
console.log(data); |