Skip to content

Instantly share code, notes, and snippets.

View ersin-demirtas's full-sized avatar
:octocat:

ed ersin-demirtas

:octocat:
View GitHub Profile
INSERT INTO `states` (`name_long`, `name_short`, `created_at`) VALUES
('Alabama', 'AL', now()),
('Alaska', 'AK', now()),
('Arizona', 'AZ', now()),
('Arkansas', 'AR', now()),
('California', 'CA', now()),
('Colorado', 'CO', now()),
('Connecticut', 'CT', now()),
('Delaware', 'DE', now()),
('Florida', 'FL', now()),
INSERT INTO `states` (`name_long`, `name_short`, `created_at`) VALUES
('Alabama', 'AL', now()),
('Alaska', 'AK', now()),
('Arizona', 'AZ', now()),
('Arkansas', 'AR', now()),
('California', 'CA', now()),
('Colorado', 'CO', now()),
('Connecticut', 'CT', now()),
('Delaware', 'DE', now()),
('Florida', 'FL', now()),
insert into countries(name, iso2, iso3, currency, created_at) VALUES ("Afghanistan","AF","AFG","AFN", now());
insert into countries(name, iso2, iso3, currency, created_at) VALUES ("Albania","AL","ALB","ALL", now());
insert into countries(name, iso2, iso3, currency, created_at) VALUES ("Algeria","DZ","DZA","DZD", now());
insert into countries(name, iso2, iso3, currency, created_at) VALUES ("American Samoa","AS","ASM","USD", now());
insert into countries(name, iso2, iso3, currency, created_at) VALUES ("Andorra","AD","AND","EUR", now());
insert into countries(name, iso2, iso3, currency, created_at) VALUES ("Angola","AO","AGO","AOA", now());
insert into countries(name, iso2, iso3, currency, created_at) VALUES ("Anguilla","AI","AIA","XCD", now());
insert into countries(name, iso2, iso3, currency, created_at) VALUES ("Antarctica","AQ","ATA","", now());
insert into countries(name, iso2, iso3, currency, created_at) VALUES ("Antigua and Barbuda","AG","ATG","XCD", now());
insert into countries(name, iso2, iso3, currenc
insert into countries(name, iso2, iso3, currency, created_at) VALUES ("Afghanistan","AF","AFG","AFN", now());
insert into countries(name, iso2, iso3, currency, created_at) VALUES ("Albania","AL","ALB","ALL", now());
insert into countries(name, iso2, iso3, currency, created_at) VALUES ("Algeria","DZ","DZA","DZD", now());
insert into countries(name, iso2, iso3, currency, created_at) VALUES ("American Samoa","AS","ASM","USD", now());
insert into countries(name, iso2, iso3, currency, created_at) VALUES ("Andorra","AD","AND","EUR", now());
insert into countries(name, iso2, iso3, currency, created_at) VALUES ("Angola","AO","AGO","AOA", now());
insert into countries(name, iso2, iso3, currency, created_at) VALUES ("Anguilla","AI","AIA","XCD", now());
insert into countries(name, iso2, iso3, currency, created_at) VALUES ("Antarctica","AQ","ATA","", now());
insert into countries(name, iso2, iso3, currency, created_at) VALUES ("Antigua and Barbuda","AG","ATG","XCD", now());
insert into countries(name, iso2, iso3, currenc
insert into countries(name, iso2, iso3, currency, created_at) VALUES ("Afghanistan","AF","AFG","AFN", now());
insert into countries(name, iso2, iso3, currency, created_at) VALUES ("Albania","AL","ALB","ALL", now());
insert into countries(name, iso2, iso3, currency, created_at) VALUES ("Algeria","DZ","DZA","DZD", now());
insert into countries(name, iso2, iso3, currency, created_at) VALUES ("American Samoa","AS","ASM","USD", now());
insert into countries(name, iso2, iso3, currency, created_at) VALUES ("Andorra","AD","AND","EUR", now());
insert into countries(name, iso2, iso3, currency, created_at) VALUES ("Angola","AO","AGO","AOA", now());
insert into countries(name, iso2, iso3, currency, created_at) VALUES ("Anguilla","AI","AIA","XCD", now());
insert into countries(name, iso2, iso3, currency, created_at) VALUES ("Antarctica","AQ","ATA","", now());
insert into countries(name, iso2, iso3, currency, created_at) VALUES ("Antigua and Barbuda","AG","ATG","XCD", now());
insert into countries(name, iso2, iso3, currenc
@ersin-demirtas
ersin-demirtas / sources.list
Created October 12, 2018 08:10
[solved] W: GPG error: http://nginx.org trusty InRelease: The following signatures were invalid: KEYEXPIRED 1471427554
wget https://nginx.org/keys/nginx_signing.key -O - | sudo apt-key add -
apt-get update
@ersin-demirtas
ersin-demirtas / secure-ssh
Created October 11, 2018 21:53
Secure SSH - 2018 October - SSH-2.0-OpenSSH_7.6p1 Ubuntu-4
# SSH to your server
# Change directory to /etc/ssh
cd /etc/ssh/
# Create a /etc/ssh back folder
mkdir -p ~/backup/etc/ssh/
# Move the unsecure host keys backup folder
mv ssh_host_{ecdsa,dsa,rsa}* ~/backup/etc/ssh/
@ersin-demirtas
ersin-demirtas / nginx-allow-only-get-request-method
Last active June 14, 2022 09:48
Secure - NGINX allow only get request method
# Open your /etc/nginx/sites-enabled/sitename.com file place limit_except directive
# More info available at http://nginx.org/en/docs/http/ngx_http_core_module.html#limit_except
location / {
limit_except GET {
deny all;
}
try_files $uri $uri/ =404;
@ersin-demirtas
ersin-demirtas / iptables-common.conf
Last active October 13, 2018 08:48
Fail2Ban DROP instead of REJECT
# If iptables-common.conf doesn't exists the update iptables-blocktype.conf instead.
#edit /etc/fail2ban/action.d/iptables-common.conf
#Please read https://serverfault.com/questions/157375/reject-vs-drop-when-using-iptables?answertab=active#tab-top before you start using.
# Find and comment out
# blocktype = REJECT --reject-with icmp-port-unreachable
# Replace with
blocktype = DROP
@ersin-demirtas
ersin-demirtas / deployment-tool-ansible-puppet-chef-salt.md
Created December 12, 2017 22:00 — forked from jaceklaskowski/deployment-tool-ansible-puppet-chef-salt.md
Choosing a deployment tool - ansible vs puppet vs chef vs salt

Requirements

  • no upfront installation/agents on remote/slave machines - ssh should be enough
  • application components should use third-party software, e.g. HDFS, Spark's cluster, deployed separately
  • configuration templating
  • environment requires/asserts, i.e. we need a JVM in a given version before doing deployment
  • deployment process run from Jenkins

Solution