This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import json | |
import os | |
import time | |
import webbrowser | |
import sys | |
import re | |
def handleWindows(extra_seconds): | |
print("OS : Windows") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
from string import ( | |
ascii_lowercase, | |
ascii_uppercase, | |
digits, | |
punctuation | |
) | |
from secrets import choice | |
import sys |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# kubernates & minikube | |
minikube start --vm-driver=virtualbox --container-runtime=docker --cpus 4 --memory 8192 -p minikube-default --disk 40000 | |
minikube start | |
minikube stop | |
minikube delete | |
# docker machine | |
docker-machine create --driver virtualbox docker-machine-default | |
docker-machine start docker-machine-default | |
docker-machine stop docker-machine-default |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ sudo timedatectl set-timezone Europe/Istanbul | |
$ ls -l /etc/localtime -> sym link görülmeli | |
lrwxrwxrwx. 1 root root 37 Jan 26 20:26 /etc/localtime -> ../usr/share/zoneinfo/Europe/Istanbul | |
$ sudo timedatectl set-ntp yes | |
# set locale | |
$ sudo vi /etc/environment |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
node { | |
def testHost = "yyy.xxxx.com" | |
stage('git pull') { // for display purposes | |
sh "ssh centos@${testHost} 'cd app; git reset HEAD --hard; git clean -df'" | |
sh "ssh centos@${testHost} 'cd app; git pull http://jenkins:xxxxxxxx@yyy.xxxx.com/app.git'" | |
} | |
stage('compile, package, rename, copy'){ | |
sh "ssh centos@${testHost} 'cd app; npm run testbuild'" | |
sh "ssh centos@${testHost} 'cd /var/www/yyy.xxxx.com; rm -rf *; cd /home/centos/app; cp -R ./dist/* /var/www/yyy.xxxx.com'" | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CREATE ROLE user_select_only WITH LOGIN; | |
\password user_select_only; | |
\c user_db; | |
--GRANT USAGE ON SCHEMA public TO user_select_only; | |
GRANT SELECT ON ALL TABLES IN SCHEMA public TO user_select_only; | |
GRANT SELECT ON ALL SEQUENCES IN SCHEMA public TO user_select_only; | |
--CREATE USER user_select_only WITH PASSWORD 'pass'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CREATE DATABASE database; | |
CREATE USER user WITH PASSWORD 'pass'; | |
GRANT ALL PRIVILEGES ON DATABASE database TO user; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
wkhtmltopdf -s A4 -O Portrait --zoom 2.5 --disable-smart-shrinking --header-spacing 5 --javascript-delay 900 --dpi 300 https://github.com/wkhtmltopdf/wkhtmltopdf/issues/1771 akilx.pdf |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'rubygems' | |
require 'nokogiri' | |
require 'open-uri' | |
require 'active_record' | |
require 'date' | |
# database | |
ActiveRecord::Base.logger = Logger.new(File.open("sahibimden_emlak_konut_database_#{Time.now.strftime("%Y_%m")}.log", 'w')) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'rubygems' | |
require 'nokogiri' | |
require 'open-uri' | |
require 'active_record' | |
require 'date' | |
# database | |
ActiveRecord::Base.logger = Logger.new(File.open("sahibimden_emlak_database_#{Time.now.strftime("%Y_%m")}.log", 'w')) |
NewerOlder