This file contains 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
103.130.144.0/24 | |
103.130.146.0/24 | |
103.215.220.0/22 | |
103.216.60.0/22 | |
103.231.136.0/22 | |
109.107.131.0/24 | |
109.108.160.0/19 | |
109.109.32.0/19 | |
109.110.160.0/19 | |
109.122.193.0/24 |
This file contains 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
image: alpine:latest | |
pages: | |
only: | |
- master | |
stage: deploy | |
before_script: | |
- 'command -v ssh-agent >/dev/null || ( apk add --update openssh )' | |
- eval $(ssh-agent -s) | |
- echo "$SSH_PRIVATE_KEY" | tr -d '\r' | ssh-add - |
This file contains 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
<script> | |
function RefundCtrl() { | |
var self = this; | |
var vendorDeliveryFaultSlider; | |
var max; | |
var invoiceItemId; |
This file contains 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 table laravel._keep_changes | |
( | |
id serial not null | |
constraint _keep_changes_pk | |
primary key, | |
operation char not null, | |
transaction_id integer, | |
changes text, | |
created_at timestamp(0) not null, | |
current_database_user varchar, |
This file contains 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
#!/bin/bash | |
was_paused=0 # if last state was paused | |
ad=0 # if an ad is probably playing right now | |
while true; do | |
num=$(pactl list | grep -E '(^Sink Input)|(media.name = \"Spotify\"$)' | awk '/Spotify/ {print a} {a = $0}' | cut -c 13-) | |
icon_name=$(xprop -name 'spotify' _NET_WM_ICON_NAME | cut -d \" -f 2) | |
song_name=$(dbus-send --print-reply --session --dest=org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.freedesktop.DBus.Properties.Get string:'org.mpris.MediaPlayer2.Player' string:'Metadata' | grep xesam:title -A 1 | grep variant | cut -d \" -f 2) |
This file contains 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 or replace FUNCTION money_format(amount int) | |
RETURNS text AS $$ | |
BEGIN | |
return trim(to_char(amount, '999,999,999,999,999,999,999,999,999,999')); | |
END; | |
$$ | |
LANGUAGE plpgsql; | |
CREATE or replace FUNCTION money_format(amount bigint) | |
RETURNS text AS $$ |
This file contains 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
<?php | |
$fname = 'حسین'; | |
if (!preg_match('/^([\x{0621}-\x{063A}\x{0641}-\x{064A}\x{064E}-\x{0651}\x{0654}-\x{0655}\x{06A9}\x{06CC}\x{FB8A}\x{067E}\x{0686}\x{06AF}\x{0698}\x{0670}\x{200c}\x{06c1}\x{06c2} ])+$/u', $fname)) | |
{ | |
echo "نام معتبر نیست!"; | |
} | |
$fname = 'hossein'; | |
if (!preg_match('/^([\x{0621}-\x{063A}\x{0641}-\x{064A}\x{064E}-\x{0651}\x{0654}-\x{0655}\x{06A9}\x{06CC}\x{FB8A}\x{067E}\x{0686}\x{06AF}\x{0698}\x{0670}\x{200c}\x{06c1}\x{06c2} ])+$/u', $fname)) | |
{ |
This file contains 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
USE [master] | |
GO | |
declare @dbname nvarchar(20) | |
set @dbname = 'HM_benchmark' -- => set db name here <= -- | |
IF OBJECT_ID('tempdb.dbo.#vars', 'U') IS NOT NULL | |
DROP TABLE #vars; | |
create table #vars (dbname varchar(20), create_script nvarchar(80),use_script nvarchar(80)) | |
insert #vars values (@dbname,'Create DATABASE ' + @dbname,'USE [' + @dbname + ']') |
This file contains 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
server { | |
listen 80; | |
server_name mylaravelproj.me www.mylaravelproj.me; | |
root /var/www/mylaravelproj.me/public; | |
index index.html index.php index.htm; | |
location / { | |
try_files $uri $uri/ /index.php?$query_string; | |
} |
This file contains 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
# ===========> Start copying <=============# | |
DELIMITER // | |
CREATE PROCEDURE changeAllCollations( | |
db_name VARCHAR(100), | |
char_set VARCHAR(25), | |
collation_name VARCHAR(50), | |
prevent_key_too_long Boolean | |
) | |
BEGIN |