Skip to content

Instantly share code, notes, and snippets.

View ronoaldo's full-sized avatar
🏠
Working from home

Ronoaldo Pereira ronoaldo

🏠
Working from home
View GitHub Profile
@ronoaldo
ronoaldo / 50unattended-upgrades
Last active November 8, 2020 15:50
Follow kernel and firmware from debian backports
Unattended-Upgrade::Origins-Pattern {
"origin=Debian,codename=${distro_codename},label=Debian";
"origin=Debian,codename=${distro_codename},label=Debian-Security";
"o=Debian Backports,a=${distro_codename}-backports,l=Debian Backports";
};
Unattended-Upgrade::Package-Blacklist {
};
Unattended-Upgrade::AutoFixInterruptedDpkg "true";
Unattended-Upgrade::MinimalSteps "true";
Unattended-Upgrade::Remove-Unused-Dependencies "true";
@ronoaldo
ronoaldo / Slic3r_bundle_20190902.ini
Created September 2, 2019 12:55
Slic3r Settings - 2019-09-02
# generated by Slic3r 1.3.1-dev on Mon Sep 2 09:47:57 2019
[filament:3D Prime - PETG]
bed_temperature = 0
bridge_fan_speed = 75
compatible_printers =
cooling = 1
disable_fan_first_layers = 3
end_filament_gcode = "; Filament-specific end gcode \n;END gcode for filament\n"
extrusion_multiplier = 1
@ronoaldo
ronoaldo / ap-5r-launch.sh
Created February 17, 2018 04:18
ap-5r-launch.sh
#!/bin/bash
# Settings
SWGOH_USER=
SWGOH_PASS=
BOT1_TOKEN=
BOT2_TOKEN=
# First Instance
docker run --rm -it --name bot1 \
@ronoaldo
ronoaldo / swf2mp4.sh
Created August 8, 2017 20:28
Converte SWF para MP4
#!/bin/bash
echo "swf2mp4.sh - flash player to mp4 conversion script"
echo " * Requires gnash, mplayer2 and ffmpeg CLI tools"
echo " * Source https://stackoverflow.com/a/39304421 (Aleksey Kontsevich)"
SWFFILE=$1
MP4FILE=${SWFFILE%.*}.mp4
TMPFILE=$(cat /dev/urandom | tr -dc 'a-zA-Z' | fold -w 32 | head -n 1).bin
@ronoaldo
ronoaldo / data_access_query_billing_report.sql
Created June 6, 2017 21:28
Big Query audit report supporting query - fixes for the updated Cloud Audit schema.
SELECT
timestamp as Date,
resource.labels.project_id as ProjectId,
protopayload_auditlog.serviceName as ServiceName,
protopayload_auditlog.methodName as MethodName,
protopayload_auditlog.status.code as StatusCode,
protopayload_auditlog.status.message as StatusMessage,
protopayload_auditlog.authenticationInfo.principalEmail as UserId,
protopayload_auditlog.servicedata_v1_bigquery.jobCompletedEvent.job.jobName.jobId as JobId,
protopayload_auditlog.servicedata_v1_bigquery.jobCompletedEvent.job.jobConfiguration.query.query as Query,
@ronoaldo
ronoaldo / datamine2html.go
Created October 1, 2016 03:04
datamine2html.go
package main
import (
"fmt"
"bufio"
"os"
"strings"
"regexp"
)
@ronoaldo
ronoaldo / clouddns-update
Last active June 7, 2017 16:25
Cloud DNS record set configuration during instance startup.
#!/bin/bash
#
# Helper script to auto-configure a Cloud DNS record during
# compute engine instance startup.
#
# Setup:
# 1. Download and install the script in the instance:
# curl -L https://gist.github.com/ronoaldo/6d6f97bc20a5a40c4aac5e4fa6c09dd5/raw/ > /etc/init.d/clouddns-update
# 2. Give this script permissions and setup as startup daemon
diff --git a/vendor/golang.org/x/net/context/ctxhttp/cancelreq.go b/vendor/golang.org/x/net/context/ctxhttp/cancelreq.go
index 48610e3..214fbaf 100644
--- a/vendor/golang.org/x/net/context/ctxhttp/cancelreq.go
+++ b/vendor/golang.org/x/net/context/ctxhttp/cancelreq.go
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// +build go1.5
+// +build !appengine
@ronoaldo
ronoaldo / facedetect.go
Last active December 23, 2016 12:35
Go + SWIG + Open CV 2.4
package facedetect
// #cgo CXXFLAGS: -std=c++11
// #cgo pkg-config: opencv
import "C"
@ronoaldo
ronoaldo / gist:0d1c66b7ebe5baa339ba
Created August 31, 2015 21:32
Install Go 1.5 oneliner shell
curl -Ss https://storage.googleapis.com/golang/go1.5.linux-amd64.tar.gz | tar -C /usr/local -xzf-