Skip to content

Instantly share code, notes, and snippets.

View vietdien2005's full-sized avatar
🦉
there's something dark inside

Dam Viet vietdien2005

🦉
there's something dark inside
View GitHub Profile
@vietdien2005
vietdien2005 / mkgit-centos6.sh
Created December 28, 2017 02:33 — forked from eyecatchup/mkgit-centos6.sh
Bash script to install the latest Git version on CentOS 6.x.
#!/usr/bin/env bash
# Install the latest version of git on CentOS 6.x
# Install Required Packages
sudo yum install curl-devel expat-devel gettext-devel openssl-devel zlib-devel
sudo yum install gcc perl-ExtUtils-MakeMaker
# Uninstall old Git RPM
sudo yum remove git
@vietdien2005
vietdien2005 / install.sh
Created August 13, 2017 15:13 — forked from ziadoz/install.sh
Install Chrome, ChromeDriver and Selenium on Ubuntu 16.04
#!/usr/bin/env bash
# https://developers.supportbee.com/blog/setting-up-cucumber-to-run-with-Chrome-on-Linux/
# https://gist.github.com/curtismcmullan/7be1a8c1c841a9d8db2c
# http://stackoverflow.com/questions/10792403/how-do-i-get-chrome-working-with-selenium-using-php-webdriver
# http://stackoverflow.com/questions/26133486/how-to-specify-binary-path-for-remote-chromedriver-in-codeception
# http://stackoverflow.com/questions/40262682/how-to-run-selenium-3-x-with-chrome-driver-through-terminal
# http://askubuntu.com/questions/760085/how-do-you-install-google-chrome-on-ubuntu-16-04
# Versions
CHROME_DRIVER_VERSION=`curl -sS chromedriver.storage.googleapis.com/LATEST_RELEASE`
@vietdien2005
vietdien2005 / create-docker-tls.sh
Created June 1, 2017 02:47 — forked from Stono/create-docker-tls.sh
Creating and setting up Docker for TLS
#!/bin/bash
# This script will help you setup Docker for TLS authentication.
# Run it passing in the arguement for the FQDN of your docker server
#
# For example:
# ./create-docker-tls.sh myhost.docker.com
#
# The script will also create a profile.d (if it exists) entry
# which configures your docker client to use TLS
#
@vietdien2005
vietdien2005 / Theming-Slack-OSX.md
Created May 25, 2017 08:36 — forked from mswieboda/Theming-Slack-OSX.md
Theming Slack for OSX 🕶️

Theming Slack for OSX

So, you love Slack, but you hate applications with large white backgrounds? Why not use Dark Mode! 🕶️

Unfortunately, Slack does not have a Dark Mode, although it's on their list of possibilities.

But, don't fret - there is a solution! Because the slack native desktop apps are just wrappers around a web app, we can inject our own CSS to customize the application to our liking.

(I take no credit for this exploit, graciously found via @DrewML https://gist.github.com/DrewML/0acd2e389492e7d9d6be63386d75dd99 and suggestions by @bradens, @jouni, @gkostov and others).

@vietdien2005
vietdien2005 / QueryBuilderQuery.php
Created December 14, 2016 05:11 — forked from alexander-torosh/QueryBuilderQuery.php
Example of using Phalcon Query Builder and Columns method
<?php
$qb = $this->modelsManager->createBuilder()
->columns(['e.*', 'i.*'])
->addFrom('Backend\Models\Event', 'e')
->innerJoin('Backend\Models\Image', 'e.id = i.event_id', 'i')
->where('e.id = :id:', ['id' => $some_id]);
$entries = $qb->getQuery()->execute();