Skip to content

Instantly share code, notes, and snippets.

View thinmy's full-sized avatar
🎯
Focusing

Thinmy Patrick Alves thinmy

🎯
Focusing
View GitHub Profile
@plindberg
plindberg / README.md
Created August 5, 2017 16:46
How to set up an AWS Lambda function for returning S3 pre-signed URLs for uploading files.

README

Granted, this is little more than an obfuscated way of having a publicly writable S3 bucket, but if you don’t have a server which can pre-sign URLs for you, this might be an acceptable solution.

For this to work, you take the following steps:

  1. Create a Lambda func, along with a new IAM role, keeping the default code.
  2. Create an API in the API Gateway.
@IgorHalfeld
IgorHalfeld / webstorm.txt
Created June 4, 2017 03:20
Webstorm server activation
http://idea.imsxm.com/
kubectl -n kube-system create sa jenkins
kubectl create clusterrolebinding jenkins --clusterrole cluster-admin --serviceaccount=<namespace>:jenkins
@paulsturgess
paulsturgess / service.js
Last active August 8, 2024 04:25
An example Service class wrapper for Axios
import axios from 'axios';
class Service {
constructor() {
let service = axios.create({
headers: {csrf: 'token'}
});
service.interceptors.response.use(this.handleSuccess, this.handleError);
this.service = service;
}
@waleedahmad
waleedahmad / post_install.sh
Last active February 11, 2025 17:52
Ubuntu post installation script for installing software of your choice.
#!/bin/bash
if [[ $EUID -ne 0 ]]; then
echo "This script must be run as root"
exit 1
else
#Update and Upgrade
echo "Updating and Upgrading"
apt-get update && sudo apt-get upgrade -y
<?php
namespace App\Services;
use Aws\Credentials\CredentialProvider;
use Aws\Credentials\Credentials;
use Aws\ElasticsearchService\ElasticsearchPhpHandler;
use Elasticsearch\ClientBuilder;
use Laravel\Scout\Engines\ElasticsearchEngine;
@santoshachari
santoshachari / Laravel PHP7 LEMP AWS.md
Last active March 21, 2025 14:46
Laravel 5.x on Ubuntu 16.x, PHP 7.x, Nginx 1.9.x

#Steps to install latest Laravel, LEMP on AWS Ubuntu 16.4 version. This tutorial is the improvised verision of this tutorial on Digitalocean based on my experience.

Install PHP 7 on Ubuntu

Run the following commands in sequence.

sudo apt-get install -y language-pack-en-base
sudo LC_ALL=en_US.UTF-8 add-apt-repository ppa:ondrej/php
sudo apt-get update
sudo apt-get install zip unzip
@billinghamj
billinghamj / body-codes.csv
Last active January 24, 2024 15:01
DVLA V355 - code mappings, normalized & cleaned, in CSV format
Code Category Subcategory Description
1 Cars & Light 4X4 Utilities Cars 2-Door Saloon
2 Cars & Light 4X4 Utilities Cars 4-Door Saloon
3 Cars & Light 4X4 Utilities Cars Saloon (for information only, no longer used)
4 Cars & Light 4X4 Utilities Cars Convertible
5 Cars & Light 4X4 Utilities Cars Coupe
6 Cars & Light 4X4 Utilities Cars Estate
11 Cars & Light 4X4 Utilities Cars Hearse
12 Cars & Light 4X4 Utilities Cars Limousine
13 Cars & Light 4X4 Utilities Cars 3-Door Hatchback

docker-youtrack

Bitdeli Badge

Easy youtrack deployment using docker

These Dockerfiles allow you to easily build images to deploy your own youtrack instance. It's free for up to ten users.

Disclaimer

Besides that, as always, use these scripts with care.

@henriquemenezes
henriquemenezes / postgresql-set-id-seq.sql
Created March 31, 2016 12:23
PostgreSQL set Next ID Sequence Value to MAX(id) from Table
-- Get Max ID from table
SELECT MAX(id) FROM table;
-- Get Next ID from table
SELECT nextval('table_id_seq');
-- Set Next ID Value to MAX ID
SELECT setval('table_id_seq', (SELECT MAX(id) FROM table));