Skip to content

Instantly share code, notes, and snippets.

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

iainheng

🏠
Working from home
View GitHub Profile
@iainheng
iainheng / index.html
Created March 7, 2024 13:58 — forked from oaluna/index.html
Stripe Website Gradient Animation
<html>
<head>
<title>Stripe Gradient</title>
</head>
<body>
<canvas id="gradient-canvas" data-js-darken-top data-transition-in>
<!--
Remove data-js-darken-top to keep the same brightness in the upper part of the canvas
-->
</canvas>
  1. Make sure mysql-client is installed. If not, then :
    sudo apt install mysql-client
	or
    sudo apt-get install mysql-client
  1. Open php.ini

; PHP's default character set is set to UTF-8.

@iainheng
iainheng / steam process priority.md
Last active May 11, 2022 13:56
Launch steam game with AboveNormal process priority

Street Fighter 5

start steam://rungameid/310950
timeout 20
wmic process where name="StreetFighterV.exe" CALL setpriority "32768"

Dota 2

start steam://rungameid/570
@iainheng
iainheng / mkcert.txt
Last active January 17, 2023 11:32 — forked from jitheshkt/instructions.txt
Installing SSL on WSL2 Apache
# The idea is, we don't install certificates on WSL, instead we install them on
# Windows and point the path at WSL Apache/Ngnix configuration file.
# We use mkcert to generate certificates.
# https://github.com/FiloSottile/mkcert
# Install mkcert on Linux. Even though we don't generate certificate here,
# I am installing this only to check the constant is properly set or not.
# If you're Linux Ninja like my friend Bombay, you could do it without
# This package for sure.
@iainheng
iainheng / .hyper.js
Created May 15, 2019 08:19
.hyper.js
// Future versions of Hyper may add additional config options,
// which will not automatically be merged into this file.
// See https://hyper.is#cfg for all currently supported options.
module.exports = {
config: {
// choose either `'stable'` for receiving highly polished,
// or `'canary'` for less polished but more frequent updates
updateChannel: 'stable',
@iainheng
iainheng / Homestead-Magento.yaml
Created April 30, 2019 16:55 — forked from erickpatrick/Homestead-Magento.yaml
Laravel Homestead on Windows with SMB ("faster shared folders")
---
ip: "192.168.10.10"
memory: 4096
cpus: 2
provider: virtualbox
authorize: C:/Users/<your-user>/.ssh/id_rsa.pub
keys:
- C:/Users/<your-user>/.ssh/id_rsa
@iainheng
iainheng / linux command.md
Last active April 8, 2025 06:57
Useful linux commands

Use Grep to Find Files Based on Content

The find command is only able to filter the directory hierarchy based on a file’s name and meta data. If you need to search based on the content of the file, use a tool like grep. Consider the following example:

find . -type f -exec grep "example" '{}' \; -print

This searches every object in the current directory hierarchy (.) that is a file (-type f) and then runs the command grep "example" for every file that satisfies the conditions. The files that match are printed on the screen (-print). The curly braces ({}) are a

# working with npm
npm install -g yarn
npm install -g npx
npm install -g np
npm install -g npm-name-cli
# debugging
npm install -g ndb
npm install -g node-inspector
@iainheng
iainheng / git.md
Last active May 13, 2017 07:06 — forked from hofmannsven/README.md
My simply Git Cheatsheet
@iainheng
iainheng / ocp.php
Created April 25, 2017 04:32 — forked from ck-on/ocp.php
OCP - Opcache Control Panel (aka Zend Optimizer+ Control Panel for PHP)#ocp #php #opcache #opcode #cache #zend #optimizerplus #optimizer+
<?php
/*
OCP - Opcache Control Panel (aka Zend Optimizer+ Control Panel for PHP)
Author: _ck_ (with contributions by GK, stasilok)
Version: 0.1.7
Free for any kind of use or modification, I am not responsible for anything, please share your improvements
* revision history
0.1.7 2015-09-01 regex fix for PHP7 phpinfo
0.1.6 2013-04-12 moved meta to footer so graphs can be higher and reduce clutter