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
#! /bin/bash | |
printf "Installing RDP Be Patience... " >&2 | |
{ | |
sudo useradd -m chungvh | |
sudo adduser chungvh sudo | |
echo 'chungvh:your_passwd' | sudo chpasswd | |
sed -i 's/\/bin\/sh/\/bin\/bash/g' /etc/passwd | |
sudo apt-get update | |
wget https://dl.google.com/linux/direct/chrome-remote-desktop_current_amd64.deb | |
sudo dpkg --install chrome-remote-desktop_current_amd64.deb |
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
// ==UserScript== | |
// @name Dark theme dbdiagram.io | |
// @namespace http://tampermonkey.net/ | |
// @version 0.1 | |
// @description try to take over the world! | |
// @icon https://cdn.holistics.io/logo-dbdiagram-notext.ico | |
// @author You | |
// @match https://dbdiagram.io/d/* | |
// @require https://code.jquery.com/jquery-3.4.1.min.js | |
// @grant none |
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
{"swagger":"2.0","info":{"description":"This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters.","version":"1.0.5","title":"Swagger Petstore","termsOfService":"http://swagger.io/terms/","contact":{"email":"[email protected]"},"license":{"name":"Apache 2.0","url":"http://www.apache.org/licenses/LICENSE-2.0.html"}},"host":"petstore.swagger.io","basePath":"/v2","tags":[{"name":"pet","description":"Everything about your Pets","externalDocs":{"description":"Find out more","url":"http://swagger.io"}},{"name":"store","description":"Access to Petstore orders"},{"name":"user","description":"Operations about user","externalDocs":{"description":"Find out more about our store","url":"http://swagger.io"}}],"schemes":["https","http"],"paths":{"/pet/{petId}/uploadImage":{"post":{"tags":["pet"],"summary":"uploads |
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 { SQLiteDatabaseConfig } from '@ionic-native/sqlite'; | |
//SQL file is loaded via script tag in index.html --> <script src="assets/sql/sql.js"></script> | |
declare var SQL; | |
export class SQLiteObject{ | |
_objectInstance: any; | |
constructor(_objectInstance: any){ | |
this._objectInstance = _objectInstance; |
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 | |
// Installed the need packages with Composer by running: | |
// $ composer require aws/aws-sdk-php | |
require 'vendor/autoload.php'; | |
$bucketName = 'YOUR_BUCKET_NAME'; | |
$filePath = './YOUR_FILE_NAME.png'; | |
$keyName = basename($filePath); | |
$IAM_KEY = 'YOUR_SECRET_ACCESS_KEY'; |
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 | |
$mapLink = 'https://www.google.com/maps/place/T%C3%B2a+Nh%C3%A0+S%C3%B4ng+%C4%90%C3%A0/@21.017695,105.7791101,17z/data=!3m1!4b1!4m5!3m4!1s0x313454ab30540137:0x35ac90387f094f93!8m2!3d21.01769!4d105.7813041'; | |
preg_match('/@(\-?[0-9]+\.[0-9]+),(\-?[0-9]+\.[0-9]+)/', $mapLink, $latLngArray); | |
var_dump($latLngArray); | |
$lat = $latLngArray[1]; | |
$lng = $latLngArray[2]; |
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
// ==UserScript== | |
// @name TruyenCV downloader | |
// @namespace http://devs.forumvi.com/ | |
// @description Tải truyện từ truyencv.com định dạng epub | |
// @version 2.2.1 | |
// @icon http://i.imgur.com/o5cmtkU.png | |
// @author Zzbaivong | |
// @license MIT | |
// @match http://truyencv.com/*/ | |
// @require https://code.jquery.com/jquery-3.2.1.min.js |
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/lib/mysql-workbench/mysqldump --set-gtid-purged=OFF --user=root --host=localhost --protocol=tcp --port=3306 --default-character-set=utf8 --no-data --skip-triggers --xml -p "sample" > /home/vhchung/dumps/sample_data_structure.xml |
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 calculateRate($nper, $pmt, $pv, $fv, $type, $guess) { | |
//FROM MS http://office.microsoft.com/en-us/excel-help/rate-HP005209232.aspx | |
$FINANCIAL_MAX_ITERATIONS = 20;//Bet accuracy with 128 | |
$FINANCIAL_PRECISION = 0.0000001;//1.0e-8 | |
$y, $y0, $y1, $x0, $x1 = 0, $f = 0, $i = 0; | |
$rate = $guess; | |
if (abs($rate) < $FINANCIAL_PRECISION) { |
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
#Odoo installation guide (on CentOS 7) | |
[email protected] | |
---------- | |
##Operating system |
NewerOlder