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 https://metamask.io/ | |
| - kiem tien ether ao | |
| - viet smartcontract https://remix.ethereum.org | |
| - deploy | |
| - copy address | |
| - search by address | |
| - public source | |
| my address walet: 0x08D6b0891Ca9AEb6de1Ff78b04b02Ca41d1C44F9 |
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
| pragma solidity 0.4.24; | |
| contract Lottery | |
| { | |
| address public manager; | |
| address[] public players; | |
| constructor() public | |
| { | |
| manager = msg.sender; |
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 { consts } from '../config/consts'; | |
| import { global } from '../config/global'; | |
| import * as http from 'http'; | |
| import * as lo from 'lodash'; | |
| import { | |
| UserDeviceTokenRepository | |
| } from '../repositories/userDeviceTokenRepository'; | |
| export class PushNotification |
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
| // List all files in a directory in Node.js recursively in a synchronous fashion | |
| var walkSync = function(dir, filelist) { | |
| var fs = fs || require('fs'), | |
| files = fs.readdirSync(dir); | |
| filelist = filelist || []; | |
| files.forEach(function(file) { | |
| if (fs.statSync(dir + file).isDirectory()) { | |
| filelist = walkSync(dir + file + '/', filelist); | |
| } | |
| else { |
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
| public function editorUpload(Request $request) | |
| { | |
| $validator = Validator::make($request->all(), [ | |
| 'upload' => 'required|image|mimes:jpeg,png,jpg|max:2048', | |
| ]); | |
| if ($validator->fails()) { | |
| return response()->json([ | |
| 'uploaded' => 0, | |
| 'error' => [ |
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
| - xoá file ko cần thiết khi lỡ commit | |
| ``` | |
| git reset --soft HEAD~1 | |
| git reset HEAD [duong-dan-file-can-bo] | |
| git commit -c ORIG_HEAD | |
| ``` | |
| - đưa code về lại commit | |
| ``` | |
| git reset --hard HEAD@{1} |
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
| ssh-keygen -t rsa -b 4096 -C "[email protected]" |
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
| export PATH=/bin:/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin:$PATH | |
| export EDITOR='subl -w' | |
| ln -s /Applications/Sublime\ Text.app/Contents/SharedSupport/bin/subl /usr/local/bin/subl |
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
| // 20181121191358 | |
| // https://raw.githubusercontent.com/thephucit/sublime-text/master/settings.json | |
| { | |
| "auto_indent": true, | |
| "bold_folder_labels": true, | |
| "caret_style": "phase", | |
| "color_scheme": "Packages/Theme - Flatland/Flatland Monokai.tmTheme", | |
| "draw_white_space": "all", | |
| "font_size": 12, |
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 | |
| apt-get install mysql-server | |
| apt-get install php php-mysql | |
| service nginx restart | |
| mkdir /var/www/logs | |
| sudo add-apt-repository -y ppa:ondrej/php\n | |
| apt-get update | |
| apt-get install php7.2 php7.2-cli php7.2-common |