Skip to content

Instantly share code, notes, and snippets.



  • Unicity International
  • Orem, UT
View GitHub Profile
bluetechy / BrowserLikeTabs.js
Created February 1, 2023 06:08 — forked from Rahul-RB/BrowserLikeTabs.js
Dynamically add and remove tabs in Material UI (Browser tabs feature)
View BrowserLikeTabs.js
/* No licenses, use as pleased.
* The code here uses React Class components (ES6 classes).
* Ken Nguyen has made a hooks version of this! Please find that here:
* Cheers!
import React, { Component } from "react";
import {
bluetechy / pbcopyfy
Created November 7, 2022 10:41 — forked from garywoodfine/pbcopyfy
Simple Script to configure pbcopy like functionality on ubuntu
View pbcopyfy
# Copyright (C) 2009-2017 Three Nine Consulting
# Always good practice to update packages. However ask user if they would like to do so
# For explanation on how this works and why check out
read -p "Do you want to update your package repositories before proceeding ? " -n 1 -r
echo #adding new line
if [[ $REPLY =~ ^[Yy]$ ]]
sudo apt update
sudo apt upgrade -y
bluetechy / merge
Created November 21, 2020 01:09 — forked from tmiller/merge
Bash script to merge master into all branches
View merge
# Merges the master branch into all other branches
# Process:
# - Save the name of the current branch
# - If the current branch is not master then checkout master.
# - Pull the latest changes for master from its upstream branch.
# - Loop over each local branch.
bluetechy / Component.jsx
Created November 11, 2020 06:57 — forked from krambertech/Component.jsx
ReactJS: Input fire onChange when user stopped typing (or pressed Enter key)
View Component.jsx
import React, { Component } from 'react';
import TextField from 'components/base/TextField';
const WAIT_INTERVAL = 1000;
const ENTER_KEY = 13;
export default class TextSearch extends Component {
constructor(props) {
bluetechy / ngrx8_with_immer.ts
Created October 17, 2020 06:31 — forked from born2net/ngrx8_with_immer.ts
ngrx 8+ with immer and support for on() within reducer
View ngrx8_with_immer.ts
import {createReducer} from '@ngrx/store';
import {on} from "@ngrx/store";
import produce, {Draft} from "immer";
export const initialUserState: IUserState = {
knownUsers: [user1, user2],
selectedUser: null,
scenes: null
bluetechy / GitHub
Created July 29, 2020 03:36 — forked from Integralist/GitHub
Download a single file from a private GitHub repo. You'll need an access token as described in this GitHub Help article:
View GitHub
curl --header 'Authorization: token INSERTACCESSTOKENHERE' \
--header 'Accept: application/vnd.github.v3.raw' \
--remote-name \
# Example...
bluetechy / gist:4c214d415bcef8c02bc4a8483d3fc4c9
Created July 28, 2020 08:54 — forked from madrobby/gist:9476733
Download a single file from a private GitHub repo. You'll need an access token as described in this GitHub Help article:
View gist:4c214d415bcef8c02bc4a8483d3fc4c9
curl -H 'Authorization: token INSERTACCESSTOKENHERE' -H 'Accept: application/vnd.github.v3.raw' -O -L
View gist:5a29ac91ef43b52ca0c03034b069fe35
// generate private/public key as follows:
// > openssl genrsa -out private.pem 2048
// > openssl rsa -in private.pem -outform PEM -pubout -out public.pem
$data = "String to encrypt";
$privKey = openssl_pkey_get_private('file:///path/to/private.pem');
$encryptedData = "";
bluetechy /
Created April 6, 2019 05:45 — forked from soheilhy/
How to proxy web apps using nginx?

Virtual Hosts on nginx (CSC309)

When hosting our web applications, we often have one public IP address (i.e., an IP address visible to the outside world) using which we want to host multiple web apps. For example, one may wants to host three different web apps respectively for,, and on the same machine using a single IP address.

How can we do that? Well, the good news is Internet browsers

View Dockerfile-php7-pthread
FROM centos:7
RUN yum update -y
RUN yum group install -y 'Development Tools'
RUN yum install -y libxml2-devel wget
RUN wget "" -P /usr/local/src/
RUN mv /usr/local/src/mirror /usr/local/src/php-7.0.9.tar.gz
RUN wget "" -P /usr/local/src/