Skip to content

Instantly share code, notes, and snippets.

View thinmy's full-sized avatar
🎯
Focusing

Thinmy Patrick Alves thinmy

🎯
Focusing
View GitHub Profile
@thinmy
thinmy / 0_reuse_code.js
Last active August 29, 2015 14:07
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console

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.

@thinmy
thinmy / install-redis.sh
Created June 2, 2016 01:50 — forked from dstroot/install-redis.sh
Install Redis on Amazon EC2 AMI
#!/bin/bash
# from here: http://www.codingsteps.com/install-redis-2-6-on-amazon-ec2-linux-ami-or-centos/
# and here: https://raw.github.com/gist/257849/9f1e627e0b7dbe68882fa2b7bdb1b2b263522004/redis-server
###############################################
# To use:
# wget https://raw.github.com/gist/2776679/04ca3bbb9f085b192f6aca945120fe12d59f15f9/install-redis.sh
# chmod 777 install-redis.sh
# ./install-redis.sh
###############################################
echo "*****************************************"
@thinmy
thinmy / gist:f1618df687c906d83303e5309c82c483
Created September 19, 2016 19:17 — forked from perusio/gist:1724301
Workaround in PHP cURL for the 100-continue expectation
<?php
// cURL obeys the RFCs as it should. Meaning that for a HTTP/1.1 backend if the POST size is above 1024 bytes
// cURL sends a 'Expect: 100-continue' header. The server acknowledges and sends back the '100' status code.
// cuRL then sends the request body. This is proper behaviour. Nginx supports this header.
// This allows to work around servers that do not support that header.
curl_setopt($ch, CURLOPT_HTTPHEADER, array('Expect:'));
// We're emptying the 'Expect' header, saying to the server: please accept the body right now.
// Read here: http://pilif.github.com/2007/02/the-return-of-except-100-continue/
@thinmy
thinmy / git-specify-ssh-key
Created February 25, 2018 20:51 — forked from gskielian/git-specify-ssh-key
Specifying SSH Key within Git Clone
#how to specify an ssh key to use when cloning a repo in Mac
ssh-agent bash -c 'ssh-add /Users/UR_USERNAME/.ssh/UR_PRIVATE_KEY; git clone git@DAS_GIT_URL'
@thinmy
thinmy / websockets-server.js
Created October 9, 2018 10:50
Pure Node.js WebSockets server
/*
* node-ws - pure Javascript WebSockets server
* Copyright Bradley Wright <brad@intranation.com>
*/
// Use strict compilation rules - we're not animals
'use strict';
var net = require('net'),
crypto = require('crypto');
@thinmy
thinmy / install-python.sh
Created October 9, 2018 10:50
Install Python 3.6.5 in Ubuntu 16+
#!/bin/bash
export PYTHON_VERSION=3.6.5
export PYTHON_DOWNLOAD_URL=https://www.python.org/ftp/python/$PYTHON_VERSION/Python-$PYTHON_VERSION.tgz
sudo apt update
sudo apt install --no-install-recommends -y \
software-properties-common build-essential \
libssl-dev libreadline-dev libbz2-dev libsqlite3-dev zlib1g-dev \
python-minimal
@thinmy
thinmy / install-node.sh
Created October 9, 2018 10:50 — forked from ndaidong/install-node.sh
Install Node 8.10.0 in Ubuntu 16+
#!/bin/bash
export NODE_VERSION=8.10.0
export NODE_DOWNLOAD_URL=https://nodejs.org/dist/v$NODE_VERSION/node-v$NODE_VERSION.tar.gz
wget "$NODE_DOWNLOAD_URL" -O node.tar.gz
tar -zxvf node.tar.gz
cd node-v$NODE_VERSION
./configure
make
sudo make install
@thinmy
thinmy / create_swap.sh
Created October 9, 2018 10:51
Create swap
#!/bin/sh
export SWAP_SIZE=2G
sudo fallocate -l $SWAP_SIZE /swapfile
sudo chmod 600 /swapfile
sudo mkswap /swapfile
sudo swapon /swapfile
sudo bash -c 'echo "/swapfile none swap sw 0 0" >> /etc/fstab'
@thinmy
thinmy / setup-u1804.sh
Created October 9, 2018 10:51
Setup dev environment using Ubuntu 18.04 MinimalCD, with Xubuntu Minimal DE, Node.js, Python, Golang, and more stuff.
#!/bin/sh
export USER=ndaidong
export GIT_NAME='Dong Nguyen'
export GIT_EMAIL='ndaidong@gmail.com'
export PYTHON_VERSION=3.6.5
export PYTHON_DOWNLOAD_URL=https://www.python.org/ftp/python/$PYTHON_VERSION/Python-$PYTHON_VERSION.tgz