Skip to content

Instantly share code, notes, and snippets.

@mindesik
mindesik / add-remove-public-read-s3.txt
Created July 20, 2020 06:42 — forked from anuragmathur1/add-remove-public-read-s3.txt
s3cmd examples to add and remove public-read access for s3 buckets, folders and objects within.
## You may choose to remove --recursive if is required only for the bucket or folder and not for objects within.
s3cmd setacl --acl-private --recursive s3://mybucket-name
s3cmd setacl --acl-private --recursive s3://mybucket-name/folder-name
s3cmd setacl --acl-private --recursive s3://mybucket-name/folder-name/object-name
s3cmd setacl --acl-public --recursive s3://mybucket-name
s3cmd setacl --acl-public --recursive s3://mybucket-name/folder-name
s3cmd setacl --acl-public --recursive s3://mybucket-name/folder-name/object-name
@mindesik
mindesik / .hyper.js
Created December 12, 2019 11:12
My hyper config
// Future versions of Hyper may add additional config options,
// which will not automatically be merged into this file.
// See https://hyper.is#cfg for all currently supported options.
module.exports = {
config: {
hyperTabs: {
trafficButtons: true,
border: false,
tabIconsColored: true,
@mindesik
mindesik / cloudSettings
Last active December 28, 2020 03:18
Visual Studio Code Settings Sync Gist
{"lastUpload":"2020-12-28T03:18:11.875Z","extensionVersion":"v3.4.3"}
@mindesik
mindesik / client.js
Created February 22, 2019 04:42 — forked from crtr0/client.js
A simple example of setting-up dynamic "rooms" for socket.io clients to join
// set-up a connection between the client and the server
var socket = io.connect();
// let's assume that the client page, once rendered, knows what room it wants to join
var room = "abc123";
socket.on('connect', function() {
// Connected, let's sign-up for to receive messages for this room
socket.emit('room', room);
});
@mindesik
mindesik / rgb_spectrum.c
Created October 5, 2018 20:59 — forked from jimsynz/rgb_spectrum.c
Arduino sketch to cycle an RGB LED through the colour spectrum.
#define rgbFadeDelay 30
#define redPin 11
#define greenPin 10
#define bluePin 9
void setup() {
// Start off with the LED off.
setColourRgb(0,0,0);
}
@mindesik
mindesik / yarn.sh
Last active October 22, 2018 13:48
Install latest node.js and yarn on Ubuntu
#!/bin/bash
ND_VERSION=8.12.0
ND_FILE=node-v$ND_VERSION-linux-x64.tar.gz
function download {
wget https://nodejs.org/dist/v$ND_VERSION/$ND_FILE && sudo tar -C /usr/local --strip-components 1 -xzf $ND_FILE && rm $ND_FILE
}
PS3='Please choose platform: '
@mindesik
mindesik / URLSession POST.swift
Created January 14, 2018 09:35 — forked from dmathewwws/URLSession POST.swift
URLSession POST request example
private static func createUserEventData(user:SKUser, eventType:SKEventType, sticker:Sticker?) {
// server endpoint
let endpoint = "https://app.stickerkit.io/userEvent/v1/\(user.projectID)"
guard let endpointUrl = URL(string: endpoint) else {
return nil
}
//Make JSON to send to send to server
@mindesik
mindesik / install-comodo-ssl-cert-for-nginx.rst
Created December 3, 2016 19:01 — forked from bradmontgomery/install-comodo-ssl-cert-for-nginx.rst
Steps to install a Comodo PositiveSSL certificate with Nginx.

Setting up a SSL Cert from Comodo

I use Namecheap.com as a registrar, and they resale SSL Certs from a number of other companies, including Comodo.

These are the steps I went through to set up an SSL cert.

Purchase the cert

proxy_buffer_size 64k;
proxy_buffers 4 128k;
proxy_busy_buffers_size 128k;
@mindesik
mindesik / ajenti-fix-slow-https.sh
Created May 27, 2016 23:50
Fix Ajenti panel slow https on debian jessie
sudo easy_install -U gevent==1.1b4