Skip to content

Instantly share code, notes, and snippets.

View duylddev's full-sized avatar
🏠
Working from home

Justin Le duylddev

🏠
Working from home
View GitHub Profile
@duylddev
duylddev / gist:ea687b6eb2dfcd7418bd81232be12b30
Created July 30, 2020 18:47 — forked from carolineschnapp/gist:1002949
Related Products by Tags — to add to product.liquid
<!-- Solution brought to you by Caroline Schnapp -->
<!-- See this: http://wiki.shopify.com/Related_Products -->
{% assign image_size = 'compact' %}
{% assign heading = 'Other fine products' %}
{% if product.tags.size > 0 %}
<h3>{{ heading }}</h3>
<ul class="related-products"></ul>
@duylddev
duylddev / createSwapfile.sh
Created March 18, 2019 08:18 — forked from jetsonhacks/createSwapfile.sh
Create a Swapfile
#!/bin/bash
#NVIDIA Jetson TK1
#Create a swapfile for Ubuntu at the current directory location
fallocate -l 4G swapfile
#List out the file
ls -lh swapfile
# Change permissions so that only root can use it
chmod 600 swapfile
#List out the file
ls -lh swapfile
@duylddev
duylddev / PHP log
Created March 7, 2019 21:17
Klavio log
[07-Mar-2019 19:46:15 UTC] PHP Deprecated: Function create_function() is deprecated in /var/www/html/wp-content/plugins/klaviyo/klaviyo.php on line 90
[07-Mar-2019 19:46:27 UTC] PHP Deprecated: Function create_function() is deprecated in /var/www/html/wp-content/plugins/klaviyo/klaviyo.php on line 90
[07-Mar-2019 19:46:27 UTC] PHP Deprecated: Function create_function() is deprecated in /var/www/html/wp-content/plugins/klaviyo/klaviyo.php on line 90
[07-Mar-2019 19:46:27 UTC] PHP Deprecated: Function create_function() is deprecated in /var/www/html/wp-content/plugins/klaviyo/klaviyo.php on line 90
[07-Mar-2019 19:46:29 UTC] PHP Deprecated: Function create_function() is deprecated in /var/www/html/wp-content/plugins/klaviyo/klaviyo.php on line 90
[07-Mar-2019 19:46:41 UTC] PHP Deprecated: Function create_function() is deprecated in /var/www/html/wp-content/plugins/klaviyo/klaviyo.php on line 90
[07-Mar-2019 19:46:41 UTC] PHP Deprecated: Function create_function() is deprecated in /var/www/html/wp-content
@duylddev
duylddev / cloudSettings
Last active December 28, 2020 00:42
Visual Studio Code Settings Sync Gist
{"lastUpload":"2020-12-28T00:42:08.035Z","extensionVersion":"v3.4.3"}
// launch.json
{
"version": "0.2.0",
"configurations": [
{
"type": "chrome",
"request": "launch",
"name": "vuejs: chrome",
"url": "http://localhost:8080",
@duylddev
duylddev / nginx.conf
Created July 29, 2018 11:08 — forked from ashleydw/nginx.conf
Laravel nginx conf file
server {
listen 80 default_server;
server_name example.com www.example.com;
access_log /srv/www/example.com/logs/access.log;
error_log /srv/www/example.com/logs/error.log;
root /srv/www/example.com/public;
index index.php index.html;
@duylddev
duylddev / index.php
Created June 25, 2018 15:44
Chatbot
<?php
if(!isset($_REQUEST['action'])) {
die("Ahihi");
}
call_user_func('action_'.$_REQUEST['action']);
function action_xung_ho()
{
@duylddev
duylddev / install.sh
Created April 9, 2018 08:52
Install script for Linux Mint 18.3
sudo apt-get update && sudo apt-get upgrade -y && sudo apt-get dist-upgrade -y && sudo apt-get autoremove -y && sudo apt-get autoclean -y
echo "--- Arc Theme ---"
sudo sh -c "echo 'deb http://download.opensuse.org/repositories/home:/Horst3180/xUbuntu_16.04/ /' > /etc/apt/sources.list.d/arc-theme.list"
wget -nv https://download.opensuse.org/repositories/home:Horst3180/xUbuntu_16.04/Release.key -O Release.key
sudo apt-key add - < Release.key
echo "--- Papirus Icon-Theme ---"
sudo add-apt-repository ppa:papirus/papirus -y
@duylddev
duylddev / generate-ssh-key.sh
Created March 1, 2018 10:38 — forked from grenade/01-generate-ed25519-ssh-key.sh
Correct file permissions for ssh keys and config.
ssh-keygen -t rsa -b 4096 -N '' -C "[email protected]" -f ~/.ssh/id_rsa
ssh-keygen -t rsa -b 4096 -N '' -C "[email protected]" -f ~/.ssh/github_rsa
ssh-keygen -t rsa -b 4096 -N '' -C "[email protected]" -f ~/.ssh/mozilla_rsa
wget https://nodejs.org/dist/v6.10.0/node-v6.10.0-linux-x64.tar.xz
tar xvfJ node-v6.10.0-linux-x64.tar.xz
echo 'export PATH=$HOME/node-v6.10.0-linux-x64/bin:$PATH' >> ~/.bashrc
. ~/.bashrc