Skip to content

Instantly share code, notes, and snippets.

View YourFriendCaspian's full-sized avatar
🙃
I'm sure I'll be slow to respond so don't be mad.

yourfriendcaspian YourFriendCaspian

🙃
I'm sure I'll be slow to respond so don't be mad.
View GitHub Profile
@YourFriendCaspian
YourFriendCaspian / user-management.sh
Created September 2, 2017 04:13 — forked from ryanpadilha/user-management.sh
Linux user management script
#!/bin/bash
# Linux user management script
# to list all user on linux environment (listed in /etc/passwd)
getent passwd
# to list all groups on linux environment (listed in /etc/group)
getent group
# to add a new user
@YourFriendCaspian
YourFriendCaspian / fix-apt-get.sh
Created September 2, 2017 04:13 — forked from ryanpadilha/fix-apt-get.sh
Commands to fix apt - E: Sub-process /usr/bin/dpkg returned an error code (1)
#!/bin/bash
sudo rm -rf /var/lib/dpkg/info/*.*
sudo apt-get autoremove
sudo apt-get autoclean
sudo apt-get update
sudo apt-get upgrade
@YourFriendCaspian
YourFriendCaspian / pg_search_conf_unaccented.sql
Created September 2, 2017 04:14 — forked from ryanpadilha/pg_search_conf_unaccented.sql
PostgreSQL - full-text search configuration
-- enable extensions
-- full-text search on postgresql
CREATE EXTENSION unaccent;
-- languages supported
CREATE TEXT SEARCH CONFIGURATION fr ( COPY = french );
ALTER TEXT SEARCH CONFIGURATION fr ALTER MAPPING
FOR hword, hword_part, word WITH unaccent, french_stem;
CREATE TEXT SEARCH CONFIGURATION en ( COPY = english );
@YourFriendCaspian
YourFriendCaspian / simple-init-script.sh
Created September 2, 2017 04:14 — forked from blasterpal/simple-init-script.sh
simple-init-script.sh
#!/bin/bash
# from http://ubuntuserverguide.com/2012/06/how-to-installing-nginx-with-php5-and-mysql-support-on-ubuntu-server-12-04-lts.html
PHP_SCRIPT=/usr/sbin/php-fastcgi
FASTCGI_USER=www-data
FASTCGI_GROUP=www-data
PID_DIR=/var/run/php-fastcgi
PID_FILE=/var/run/php-fastcgi/php-fastcgi.pid
RET_VAL=0
case "$1" in
@YourFriendCaspian
YourFriendCaspian / generate-sshkey.sh
Created September 2, 2017 04:16 — forked from chrisvasquez/generate-sshkey.sh
Generate ssh key (linux)
#!/usr/bin/env sh
EMAIL = $1
ssh-keygen -t rsa -b 4096 -C $EMAIL
eval "$(ssh-agent -s)"
ssh-add -k ~/.ssh/id_rsa
@YourFriendCaspian
YourFriendCaspian / nextcloud-install-jessie.sh
Created September 2, 2017 04:16 — forked from yottu/nextcloud-install-jessie.sh
Installing nextcloud 12.0 on Debian GNU/Linux (Jessie) [Apache2/mysql]
### Written: 2017-06-13
### Updated: -
### Get, verify and unpack, delete and move the distribution package (12.0)
wget https://download.nextcloud.com/server/releases/nextcloud-12.0.0.tar.bz2
wget https://download.nextcloud.com/server/releases/nextcloud-12.0.0.tar.bz2.sha256
sha256sum -c nextcloud-12.0.0.tar.bz2.sha256 < nextcloud-12.0.0.tar.bz2.sha256
tar xvf nextcloud-12.0.0.tar.bz2 && rm nextcloud-12.0.0.tar.bz2
sudo mv nextcloud /var/www/
@YourFriendCaspian
YourFriendCaspian / nextcloud-install-sid.sh
Created September 2, 2017 04:17 — forked from yottu/nextcloud-install-sid.sh
Installing nextcloud 12.0 on Debian GNU/Linux (sid) [lighttpd/mariadb]
### Written: 2017-06-13
### Updated: -
### Get, verify and unpack, delete and move the distribution package (12.0)
wget https://download.nextcloud.com/server/releases/nextcloud-12.0.0.tar.bz2
wget https://download.nextcloud.com/server/releases/nextcloud-12.0.0.tar.bz2.sha256
sha256sum -c nextcloud-12.0.0.tar.bz2.sha256 < nextcloud-12.0.0.tar.bz2.sha256
tar xvf nextcloud-12.0.0.tar.bz2 && rm nextcloud-12.0.0.tar.bz2
sudo mv nextcloud /var/www/html
@YourFriendCaspian
YourFriendCaspian / command_line_app_installs.txt
Created September 2, 2017 04:24
Random Linux program install commands
# Install Postgres
http://apt.postgresql.org/pub/repos/apt/ 9.4-pgdg main
wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add -
sudo apt-get update
sudo apt-get install postgresql-9.4
# Install redis
curl -O http://download.redis.io/releases/redis-3.2.9.tar.gz
tar xzf redis-3.2.9.tar.gz
// Place your settings in the file "User/Preferences.sublime-settings", which
// overrides the settings in here.
//
// Settings may also be placed in file type specific options files, for
// example, in Packages/Python/Python.sublime-settings for python files.
{
// Sets the colors used within the text area
"color_scheme": "Packages/Color Scheme - Default/Monokai.tmTheme",
// Note that the font_face and font_size are overriden in the platform
# install git
sudo apt get install git
# install elasticsearch
sudo apt-get install build-essential libssl-dev
wget -qO - https://packages.elastic.co/GPG-KEY-elasticsearch | sudo apt-key add -
echo "deb http://packages.elastic.co/elasticsearch/2.x/debian stable main" | sudo tee -a /etc/apt/sources.list.d/elasticsearch-2.x.list
sudo apt-get update && sudo apt-get install elasticsearch
# install java