Skip to content

Instantly share code, notes, and snippets.

nitrag

  • USA
Block or report user

Report or block nitrag

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View kubernetes_service_account.tiller.tf
aws_autoscaling_group.kubedeploy: Creation complete after 48s [id=terraform-eks-demo9]
2019-06-05T21:47:19.061-0400 [DEBUG] plugin: plugin process exited: path=/Users/ryan/Documents/Pointivo/terraform-base2/.terraform/plugins/darwin_amd64/terraform-provider-aws_v2.13.0_x4 pid=56175
2019-06-05T21:47:19.061-0400 [DEBUG] plugin: plugin exited
2019/06/05 21:47:19 [TRACE] [walkApply] Exiting eval tree: provider.aws (close)
2019/06/05 21:47:19 [TRACE] vertex "provider.aws (close)": visit complete
2019/06/05 21:47:19 [TRACE] <root>: eval: *terraform.EvalReadDiff
2019-06-05T21:47:19.062-0400 [DEBUG] plugin.terraform-provider-null_v2.1.2_x4: 2019/06/05 21:47:19 [DEBUG] Instance Diff is nil in SimpleDiff()
null_resource.configure-kubectl-local: Creating...
2019/06/05 21:47:19 [DEBUG] null_resource.configure-kubectl-local: applying the planned Create change
2019/06/05 21:47:19 [TRACE] GRPCProvider: ApplyResourceChange
@nitrag
nitrag / check_mk_agent-ubuntu-install.sh
Created Mar 6, 2018
Setup check_mk_agent via systemd on Ubuntu 16.04 (OMD, Check_MK)
View check_mk_agent-ubuntu-install.sh
# How to install Check MK Agent on ubuntu 16.04
# Install check_mk_agent:
# - sudo apt-get install check-mk-agent (will install older version)
# - On your Check_MK dashboard, go to "Monitoring Agents", click the link for "Check_MK Agent for Linux", save the raw text
# on your server:
sudo vi /usr/bin/check_mk_agent
# paste Check_MK dashboard > Monitoring Agents > Check_MK Agent for Linux
@nitrag
nitrag / gdal_osx_virtualenv
Created Oct 6, 2017
Install GDAL on OSX (virtualenv)
View gdal_osx_virtualenv
# what a headache!
# 10-05-2017
# FIRST!
# Install kyngchaos 1.11 complete:
# http://www.kyngchaos.com/software/frameworks
# Go into your folder where your virtualenv lives and activate
source bin/activate
@nitrag
nitrag / convert_m4b.sh
Created Sep 28, 2017
Audibook convert m4b to mp3. This will split into chaptered mp3 files and automatically reconfigure proper ID3v2 tags.
View convert_m4b.sh
#!/bin/bash
#
# sudo apt-get install id3 ffmpeg
#
# USAGE:
# cd /book title/
# bash ~/this_script_path.sh
# rm *.m4b (you need to manually remove the original in case something goes wrong)
#
#
@nitrag
nitrag / uploadMapboxTileset.js
Last active Feb 14, 2017
Upload file to Mapbox Tileset (node.js)
View uploadMapboxTileset.js
/**
Uploads a tileset (tested with shapefile.zip) to Mapbox S3 (required),
then triggers an API request to Mapbox to create/update the tileset
Usage:
node uploadToMapBoxTileset.js [path/to/file.zip] [tilesetId] [Tileset Title]
Pro tip: Don't foget to change {username} and {access_token} and/or hardcode the process.argv[] values.
@nitrag
nitrag / commands.config
Last active Jan 12, 2019
How to setup GeoDjango on AWS Elastic Beanstalk (EB) with a Custom AMI
View commands.config
container_commands:
001installs:
command: "sudo yum-config-manager --enable epel"
setup_gdal:
command: cd /home/ec2-user/gdal-1.11.2/swig/python && /opt/python/run/venv/bin/python setup.py install
@nitrag
nitrag / GPSExif.swift
Last active Feb 6, 2019
Generate Metadata Exif for GPS
View GPSExif.swift
//
// Generate EXIF GPS metadata
// Swift 3
// Exif Version 2.2.0.0 supports decimal degrees
import Foundation
import CoreLocation
import ImageIO
extension CLLocation {
@nitrag
nitrag / Screenshot.swift
Created Nov 21, 2016
This will allow you to take a screenshot of a UIView, but more importantly only a section of that view
View Screenshot.swift
//
// Screenshot.swift
//
// 1) Take a picture of a UIView
// 2) Take a picture of a UIView's subframe. EG. Fullscreen UIView with a
// small square box in the middle, it will only save what's visible in the box frame
// but not the box itself
import Foundation
import UIKit
@nitrag
nitrag / hmac.swift
Created Nov 8, 2016 — forked from davetrux/hmac.swift
HMAC algorithm for iOS
View hmac.swift
import Foundation
//You have to create a bridging header in your project containing:
// #import <CommonCrypto/CommonHMAC.h>
extension String {
func digestHMac256(_ key: String) -> String! {
let str = self.cString(using: String.Encoding.utf8)
@nitrag
nitrag / swift_slippy_counter.swift
Created Nov 7, 2016
Swift 3 Slippy Map Tiles Counter
View swift_slippy_counter.swift
//Swift 3 - Slippy Map Tile Counter
import UIKit
import CoreLocation
private func long2tile(lon: Double, zoom: Int) -> Int {
let z = Double(zoom)
return Int(floor((lon+180) / 360 * pow(2.0, z)))
}
private func lat2tile(lat: Double, zoom: Int) -> Int {
let z = Double(zoom)
You can’t perform that action at this time.