Skip to content

Instantly share code, notes, and snippets.

View gabanox's full-sized avatar

Gabriel Ramirez gabanox

View GitHub Profile
@gabanox
gabanox / delete-versions.py
Created June 7, 2021 01:10
Delete versions from a bucket in S3
import sys
import boto3
s3 = boto3.resource('s3')
bucket = s3.Bucket(sys.argv[1])
bucket.object_versions.delete()
bucket.delete()
package com.hipermediasoft.manager;
import com.amazonaws.ClientConfiguration;
import com.amazonaws.auth.AWSCredentialsProvider;
import com.amazonaws.auth.ClasspathPropertiesFileCredentialsProvider;
import com.amazonaws.regions.Regions;
import com.amazonaws.services.dynamodbv2.AmazonDynamoDBClient;
import com.amazonaws.services.dynamodbv2.datamodeling.DynamoDBMapper;
public class DynamoDBManager {
@gabanox
gabanox / boostrap.sh
Created April 24, 2017 03:35
AWS Lambda function bootstrapping for Java Maven Projects
#!/bin/bash
project="${1}Service"
package=$2
if [ $# -lt 2 ]
then
echo "Debe especificar el nombre del proyecto y el nombre del paquete ej. [Nombre] Comercios [Paquete] com.hipermediasoft"
exit 1
fi
http://stackoverflow.com/questions/7052875/setting-up-ftp-on-amazon-cloud-server
#sdf -> aws identifier
sudo mkfs -t ext4 /dev/sdf
sudo mkdir /mnt/volume
sudo mount /dev/sdf /mnt/volume
sudo vi /etc/fstab
#include this at the end
//
// ViewController.m
// SavingImagesTutorial
//
// Created by Sidwyn Koh on 29/1/12.
// Copyright (c) 2012 Parse. All rights reserved.
//
// Photo credits: Stock Exchange (http://www.sxc.hu/)
#import "ViewController.h"
@gabanox
gabanox / pom.xml
Last active August 29, 2015 14:07
<?xml version="1.0" encoding="UTF-8"?>
<web-app>
<listener>
<listener-class>org.springframework.web.ContextLoaderListener</listener-class>
</listener>
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>
/WEB-INF/security-context.xml
</param-value>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.ewolff.aop</groupId>
<artifactId>m07-expressing-architecture-using-pointcut-annotations</artifactId>
<version>0.0.1-SNAPSHOT</version>
<properties>
<java.version>1.6</java.version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
package com.telcel.aspects;
import static org.junit.Assert.*;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
package com.telcel.aspects;
import static org.junit.Assert.*;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;