Skip to content

Instantly share code, notes, and snippets.

View vietdien2005's full-sized avatar
🦉
Don't get too close, it's dark inside

Dam Viet vietdien2005

🦉
Don't get too close, it's dark inside
View GitHub Profile
@AJMaxwell
AJMaxwell / nginx-openssl_build.sh
Last active September 12, 2021 20:57
Install Nginx, OpenSSL, and ngx_pagespeed from source on Ubuntu 14.04
#!/bin/bash
##############################################################################################
## Install Nginx with OpenSSL, and ngx_pagespeed
##
## Author: Andrew Maxwell <[email protected]>
## Date: 2017/09/18
## Version: 0.3
##
## Disclaimer: I am not responsible for how you use this script. Do not assume this script
@yjxiong
yjxiong / OpenCV.sh
Created July 7, 2016 04:03
Install OpenCV with ffmpeg and CUDA
version="2.4.12"
echo "Installing OpenCV" $version
mkdir OpenCV
cd OpenCV
echo "Removing any pre-installed ffmpeg and x264"
sudo apt-get -qq remove ffmpeg x264 libx264-dev
echo "Installing Dependenices"
@Cubixmeister
Cubixmeister / README.md
Created August 16, 2016 18:23
Simple Sentry docker-compose.yml
  1. Download docker-compose.yml to dir named sentry
  2. Change SENTRY_SECRET_KEY to random 32 char string
  3. Run docker-compose up -d
  4. Run docker exec -it sentry_sentry_1 sentry upgrade to setup database and create admin user
  5. Run docker exec -it pip install sentry-slack if you want slack plugin, it can be done later
  6. Run docker restart sentry_sentry_1
  7. Sentry is now running on public port 9000
@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();
@ziadoz
ziadoz / install.sh
Last active July 18, 2025 01:46
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
# https://stackoverflow.com/questions/10792403/how-do-i-get-chrome-working-with-selenium-using-php-webdriver
# https://stackoverflow.com/questions/26133486/how-to-specify-binary-path-for-remote-chromedriver-in-codeception
# https://stackoverflow.com/questions/40262682/how-to-run-selenium-3-x-with-chrome-driver-through-terminal
# https://askubuntu.com/questions/760085/how-do-you-install-google-chrome-on-ubuntu-16-04
# Versions
CHROME_DRIVER_VERSION=`curl -sS https://chromedriver.storage.googleapis.com/LATEST_RELEASE`
#! /usr/bin/python3
import pyautogui
import time
# Uncomment below to take position your cursor
# try:
# while True:
# x, y = pyautogui.position()
# positionStr = 'X: ' + str(x).rjust(4) + ' Y: ' + str(y).rjust(4)
# print(positionStr, end='')
@mswieboda
mswieboda / Theming-Slack-OSX.md
Last active December 3, 2017 23:45 — forked from DrewML/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).

  • Create your public key and private key
// Config RSA
$config = [
    "digest_alg"       => "sha512",
    "private_key_bits" => 2048,
    "private_key_type" => OPENSSL_KEYTYPE_RSA,
];

// Create the private and public key
@vietdien2005
vietdien2005 / encryptor.md
Created April 9, 2017 09:54
encrypt decrypt id number
function encryptor($action, $string) {
    $output = false;

    $encrypt_method = "AES-256-CBC";
    //pls set your unique hashing key
    $secret_key = 'dj7oiop1mkdp251EnCrIt4QKq4988w6a';
    $secret_iv = 'oeuGJW0cBI4ye998Z7435sj9EkGnDD34';

 // hash
@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).