Skip to content

Instantly share code, notes, and snippets.

View alincc's full-sized avatar

Alin Capitanescu alincc

View GitHub Profile
@alincc
alincc / docker_on_ubuntu.sh
Created December 4, 2021 08:54 — forked from amitavroy/docker_on_ubuntu.sh
Installing Docker on a new Ubuntu Server
sudo apt update
sudo apt-get install \
apt-transport-https \
ca-certificates \
curl \
gnupg-agent \
software-properties-common
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
@alincc
alincc / ovpn_autostart
Last active March 15, 2020 14:11 — forked from unique1984/ovpn_autostart
ovpn_autostart
#!/bin/sh
OVPNCONF="/root/ovpn/client.ovpn"
RUNNING=$(ps aux | grep -o "openvpn \-\-config" | wc -l)
case "$1" in
start)
if [ $RUNNING -eq 0 ]; then
echo -n > /var/log/ovpn_autostart.log
nohup openvpn --config "$OVPNCONF" > /var/log/ovpn_autostart.log 2>&1 &
else
@alincc
alincc / ovpn_autostart
Created March 15, 2020 13:58 — forked from unique1984/ovpn_autostart
ovpn_autostart
#!/bin/sh
OVPNCONF="/root/ovpn/client.ovpn"
RUNNING=$(ps aux | grep -o "openvpn \-\-config" | wc -l)
case "$1" in
start)
if [ $RUNNING -eq 0 ]; then
echo -n > /var/log/ovpn_autostart.log
nohup openvpn --config "$OVPNCONF" > /var/log/ovpn_autostart.log 2>&1 &
else
@alincc
alincc / redis_cheatsheet.bash
Created September 19, 2019 16:49 — forked from LeCoupa/redis_cheatsheet.bash
Redis Cheatsheet - Basic Commands You Must Know --> UPDATED VERSION --> https://github.com/LeCoupa/awesome-cheatsheets
# Redis Cheatsheet
# All the commands you need to know
redis-server /path/redis.conf # start redis with the related configuration file
redis-cli # opens a redis prompt
# Strings.
@alincc
alincc / git-pull-recursive.rb
Created August 20, 2019 07:53 — forked from jonpugh/git-pull-recursive.rb
Lots of repos? Try "git-pull-recursive" to run "git pull" on all subfolders with a .git folder inside. Thanks to http://snipplr.com/view/62314/perform-git-pull-on-subdirectory-recursive/
# For use in Chef:
# Adds a command: git-pull-recursive
file "/usr/local/bin/git-pull-recursive" do
owner "root"
group "root"
mode "0755"
action :create
content 'find . -type d -name .git -exec sh -c "cd \"{}\"/../ && pwd && git pull" \;'
end
@alincc
alincc / classifier_from_little_data_script_3.py
Created September 24, 2018 09:02 — forked from fchollet/classifier_from_little_data_script_3.py
Fine-tuning a Keras model. Updated to the Keras 2.0 API.
'''This script goes along the blog post
"Building powerful image classification models using very little data"
from blog.keras.io.
It uses data that can be downloaded at:
https://www.kaggle.com/c/dogs-vs-cats/data
In our setup, we:
- created a data/ folder
- created train/ and validation/ subfolders inside data/
- created cats/ and dogs/ subfolders inside train/ and validation/
- put the cat pictures index 0-999 in data/train/cats
'''This script goes along the blog post
"Building powerful image classification models using very little data"
from blog.keras.io.
It uses data that can be downloaded at:
https://www.kaggle.com/c/dogs-vs-cats/data
In our setup, we:
- created a data/ folder
- created train/ and validation/ subfolders inside data/
- created cats/ and dogs/ subfolders inside train/ and validation/
- put the cat pictures index 0-999 in data/train/cats
'''This script goes along the blog post
"Building powerful image classification models using very little data"
from blog.keras.io.
It uses data that can be downloaded at:
https://www.kaggle.com/c/dogs-vs-cats/data
In our setup, we:
- created a data/ folder
- created train/ and validation/ subfolders inside data/
- created cats/ and dogs/ subfolders inside train/ and validation/
- put the cat pictures index 0-999 in data/train/cats
@alincc
alincc / osx_install.sh
Created June 24, 2018 12:16 — forked from t-io/osx_install.sh
Install most of my Apps with homebrew & cask
#!/bin/sh
echo Install all AppStore Apps at first!
# no solution to automate AppStore installs
read -p "Press any key to continue... " -n1 -s
echo '\n'
echo Install and Set San Francisco as System Font
ruby -e "$(curl -fsSL https://raw.github.com/wellsriley/YosemiteSanFranciscoFont/master/install)"
echo Install Homebrew, Postgres, wget and cask
ruby -e "$(curl -fsSL https://raw.github.com/Homebrew/homebrew/go/install)"
@alincc
alincc / nginx.conf
Created April 20, 2018 10:35 — forked from plentz/nginx.conf
Best nginx configuration for improved security(and performance). Complete blog post here http://tautt.com/best-nginx-configuration-for-security/
# to generate your dhparam.pem file, run in the terminal
openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048