Skip to content

Instantly share code, notes, and snippets.

View trungpv1601's full-sized avatar
🤖
Diversifying; Practical; more code than talk.

trungpv trungpv1601

🤖
Diversifying; Practical; more code than talk.
View GitHub Profile
@trungpv1601
trungpv1601 / gist:42ff51178c9ab62fa3382dc6b8112d11
Created January 30, 2018 12:08
Deploy Laravel Ubuntu Envoy
https://serversforhackers.com/c/creating-users-and-ssh-security
https://serversforhackers.com/c/deploying-with-envoy-cast
curl -sS https://getcomposer.org/installer | sudo php -- --install-dir=/usr/local/bin --filename=composer
@trungpv1601
trungpv1601 / gist:b9936bb455f034d10bfc2bdecfabcae9
Created December 1, 2017 04:31 — forked from Mikodes/gist:be9b9ce42e46c3d4ccb6
All Media queries for resolutions
/* (320x480) iPhone (Original, 3G, 3GS) */
@media only screen and (min-device-width: 320px) and (max-device-width: 480px) {
/* insert styles here */
}
/* (320x480) Smartphone, Portrait */
@media only screen and (device-width: 320px) and (orientation: portrait) {
/* insert styles here */
}
@trungpv1601
trungpv1601 / uuids.php
Created November 21, 2017 03:53 — forked from renebakx/uuids.php
Laravel 5.4 UUID Trait
<?php
namespace App\Traits;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\ModelNotFoundException;
use Ramsey\Uuid\Uuid;
trait Uuids {
@trungpv1601
trungpv1601 / README.MD
Last active May 13, 2018 16:41
React Native: Hide TabBar React Navigation when Keyboard is activated
import React from 'react'
import { Keyboard } from 'react-native'
import { TabBarBottom } from 'react-navigation'

class TabBarComponent extends React.PureComponent {

  constructor(props) {
    super(props)
@trungpv1601
trungpv1601 / install.sh
Created November 10, 2017 06:44 — forked from indreklasn/install.sh
init our node project, install next, react, react-dom, making /pages dir
mkdir next-react-ssr && cd next-react-ssr && npm init -y && npm install --save react react-dom next && mkdir pages
@trungpv1601
trungpv1601 / README.MD
Created October 5, 2017 08:15
How to Rename A React Native App
  • Copy your icons from iOS and Android
  • Update displayName in app.json to the new name
  • Delete ios/ and android/ directories
  • Run react-native eject
  • Replace the icons you copied earlier
  • Run react-native link
  • Start your app and hope it worked! Or read the rest of this tutorial.
@trungpv1601
trungpv1601 / ts-dl.sh
Created September 13, 2017 08:48 — forked from katopz/ts-dl.sh
Download .ts video file by ffmpeg via .m3u8
# Install ffmpeg
brew install ffmpeg
# Download
ffmpeg -i https://foo.com/bar.m3u8 -c copy -bsf:a aac_adtstoasc output.mp4
@trungpv1601
trungpv1601 / youtubedl.mp3.sh
Last active September 19, 2017 13:29 — forked from rugbyprof/youtubedl.mp3.sh
youtube dl as mp3
youtube-dl --extract-audio --audio-format mp3 <video URL>
youtube-dl -i "<Youtube URL>" -o "%(title)s.%(ext)s" --extract-audio --audio-format "mp3" --audio-quality "192k"
youtube-dl --extract-audio --audio-format mp3 --audio-quality 0 URL
@trungpv1601
trungpv1601 / index.html
Last active September 11, 2017 03:34
HTML to PDF wkhtmltopdf : Problem row table break page
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>Lexor Sale Order</title>
<!-- Tell the browser to be responsive to screen width -->
<meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
<style>
@import url(https://fonts.googleapis.com/css?family=Lato:400,300,300italic,400italic,700,700italic);table,tr{page-break-inside:avoid}table{padding:.1875in .25in;border-collapse:collapse;border-spacing:0;background-color:transparent}tr{page-break-after:auto}thead{display:table-header-group}tfoot{display:table-footer-group}body,html,td,th{padding:0}body,html{height:100%;width:100%;margin:0;left:0;top:0;font-size:100%}.center,.container{margin-left:auto;margin-right:auto}*{font-family:Lato,Helvetica,sans-serif;line-height:1.5}h1{font-size:2.5rem}h2{font-size:2rem}h3{font-size:1.375rem}h4{font-size:1.125rem}h5{font-size:1rem}h6{font-size:.875rem}p{font-size:1.125rem;font-weight:200;line-height