ng new test-project
npm install bootstrap@3 --save
npm install admin-lte --save
npm install font-awesome --save
npm install sweetalert2 --save
v1 Online Demo: https://codesandbox.io/s/v1-angular-numeric-ljwlb
v2 Online Demo: https://codesandbox.io/s/v2-angular-numeric-3w2wr
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
var objectToQueryString = function(obj) { | |
var qs = _.reduce(obj, function(result, value, key) { | |
return (!_.isNull(value) && !_.isUndefined(value)) ? (result += key + '=' + value + '&') : result; | |
}, '').slice(0, -1); | |
return qs; | |
}; |
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
########## Install NGINX ############## | |
# Install software-properties-common package to give us add-apt-repository package | |
sudo apt-get install -y software-properties-common | |
# Install latest nginx version from community maintained ppa | |
sudo add-apt-repository ppa:nginx/stable | |
# Update packages after adding ppa |
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
var fs = require('fs') | |
, gm = require('gm').subClass({imageMagick: true}); | |
const imagesFolder = 'public/images/1/featured'; | |
function getFilePaths() { | |
return new Promise(resolve => { | |
fs.readdir(imagesFolder, (err, files) => { |
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
<?php | |
# .env file variables | |
# OLD_SESSION_PATH=/var/tmp/ | |
# OLD_SESSION_PRF=sess_ | |
function getUserIdFromOldSession() | |
{ | |
if( ! isset($_COOKIE['PHPSESSID']) ){ | |
return false; |
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
composer require "ahmeti/ptt-kargo-api:@dev" |
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
# Şifreli Giriş İçin | |
sudo adduser **USERNAME** | |
# Şifresiz Giriş SSH İçin | |
sudo adduser **USERNAME** --disabled-password |
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 ufw status | |
Status: active | |
To Action From | |
-- ------ ---- | |
22 LIMIT Anywhere | |
443 ALLOW Anywhere | |
80 ALLOW Anywhere | |
22 (v6) LIMIT Anywhere (v6) |
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
<?php | |
function mail_utf8($from,$from_name,$to,$adi,$subject,$body=''){ | |
// Konu | |
$subject = "=?UTF-8?B?".base64_encode(urldecode($subject))."?="; | |
// Header bilgisi | |
$headers = 'MIME-Version: 1.0' . "\r\n"; | |
$headers .= 'Content-type: text/html; charset=utf-8' . "\r\n"; |