Skip to content

Instantly share code, notes, and snippets.

View dco5's full-sized avatar

Jaime Lossada dco5

  • Kraken Technologies
  • Houston
View GitHub Profile
@russellpierce
russellpierce / glue.tf
Last active November 30, 2021 19:18
Basic Terraform Setup for AWS Glue
# Discussion on Medium: https://medium.com/@russell.s.pierce/setting-up-aws-glue-with-terraform-8f601cf36366
resource "aws_iam_role" "glue" {
name = "AWSGlueServiceRoleDefault"
assume_role_policy = <<EOF
{
"Version": "2012-10-17",
"Statement": [
{
"Action": "sts:AssumeRole",
@santiago-kai
santiago-kai / pypdf_to_image.py
Created July 6, 2017 08:22 — forked from rririanto/pypdf_to_image.py
Python Convert PDF to Image
"""
Problem:
How to Convert PDF to Image with Python Script ?
Installation:
I use ubuntu OS 14.04
We use wrapper for ImageMagick [http://www.imagemagick.org/script/index.php] to Convert The PDF file
in Python do:
$ sudo apt-get install libmagickwand-dev
@oinopion
oinopion / read-access.sql
Created October 5, 2016 13:00
How to create read only user in PostgreSQL
-- Create a group
CREATE ROLE readaccess;
-- Grant access to existing tables
GRANT USAGE ON SCHEMA public TO readaccess;
GRANT SELECT ON ALL TABLES IN SCHEMA public TO readaccess;
-- Grant access to future tables
ALTER DEFAULT PRIVILEGES IN SCHEMA public GRANT SELECT ON TABLES TO readaccess;
@andreicristianpetcu
andreicristianpetcu / ansible-summary.md
Created May 30, 2016 19:25
This is an ANSIBLE Cheat Sheet from Jon Warbrick

An Ansible summary

Jon Warbrick, July 2014, V3.2 (for Ansible 1.7)

Configuration file

intro_configuration.html

First one found from of

@ftvs
ftvs / PhonecallReceiver.java
Last active October 11, 2023 10:05
Detecting an incoming call coming to an Android device. Remember to set the appropriate permissions in AndroidManifest.xml as suggested in the Stackoverflow link. Usage example in comments. Source: Gabe Sechan http://stackoverflow.com/a/15564021/264619 Explanation: http://gabesechansoftware.com/is-the-phone-ringing/#more-8
package com.gabesechan.android.reusable.receivers;
import java.util.Date;
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.telephony.TelephonyManager;
public abstract class PhonecallReceiver extends BroadcastReceiver {
@soin08
soin08 / gulpfile.js
Last active December 4, 2023 22:33
Gulpfile.js to use with Django projects. Based on gulpfile.js from Google Web Starter Kit.
//Based on gulpfile.js from Google Web Starter Kit.
//https://github.com/google/web-starter-kit
'use strict';
// Include Gulp & Tools We'll Use
var gulp = require('gulp');
var $ = require('gulp-load-plugins')();
var del = require('del');
var runSequence = require('run-sequence');
var browserSync = require('browser-sync');
@Kursulla
Kursulla / Self signing certificate: Android and Retrofit
Last active November 13, 2018 16:58
Self signing certificate: Android and Retrofit
Enabling communication with API if server has Self-Signed Certificate
@wholypantalones
wholypantalones / ac.js
Last active October 31, 2015 16:53
Angular Google Places AutoComplete
/* Usage:
<input type="text" id="address" name="address" placeholder="Start Typing An Address" ng-model="address" details="placeDetails" googleplace />
Fiddle: http://jsfiddle.net/wholypantalones/5qtt1f8g/
*/
//controller
$scope.$watch('placeDetails', function() {
angular.forEach($scope.placeDetails.address_components,function(val,key) {
if(val.types[0] == "locality") {
$scope.city = val.short_name;
}
@Globegitter
Globegitter / es.sh
Last active November 18, 2020 12:52
Easy install for elasticsearch on Ubuntu 14.04
cd ~
##If you want to install OpenJDK
#sudo apt-get update
#sudo apt-get install openjdk-8-jre-headless -y
###Or if you want to install Oracle JDK, which seems to have slightly better performance
sudo add-apt-repository ppa:webupd8team/java
sudo apt-get update
sudo apt-get install oracle-java8-installer
@staltz
staltz / introrx.md
Last active May 27, 2024 03:11
The introduction to Reactive Programming you've been missing