Skip to content

Instantly share code, notes, and snippets.

View vuon9's full-sized avatar
🍊
chịu

Vuong vuon9

🍊
chịu
View GitHub Profile
@coolbrg
coolbrg / powershell.go
Last active March 1, 2024 09:35
Playing PowerShell command via Golang
package main
import (
"bytes"
"fmt"
"os/exec"
"strings"
)
// PowerShell struct
@stidges
stidges / tailwind.itermcolors
Last active November 30, 2023 21:00
An iTerm2 color scheme based on the Tailwind CSS color scheme (https://tailwindcss.com/docs/colors)
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Ansi 0 Color</key>
<dict>
<key>Alpha Component</key>
<real>1</real>
<key>Blue Component</key>
<real>0.17254902422428131</real>
@JanMikes
JanMikes / Dockerfile
Created September 15, 2018 16:59
Multi-stage dockerfile with xdebug for local development
####
## Production build
####
FROM php:7.1-apache as production
MAINTAINER Jan Mikeš j.mikes@me.com
## Install composer globally
RUN curl -sS https://getcomposer.org/installer | php \
&& mv composer.phar /usr/local/bin/composer
@robhrt7
robhrt7 / MySQL_5-7_macOS.md
Last active February 28, 2024 03:48 — forked from nrollr/MySQL_macOS_Sierra.md
Install MySQL 5.7 on macOS using Homebrew

This is a fork of original gist https://gist.github.com/nrollr/3f57fc15ded7dddddcc4e82fe137b58e, with slight changes on pointing to 5.7 version branch, instead of 8 (latest default of MySQL in Hombrew).

Install MySQL 5.7 on macOS

This procedure explains how to install MySQL using Homebrew on macOS (Sierra 10.12 and up)

Install Homebrew

  • Installing Homebrew is effortless, open Terminal and enter :
    $ /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
  • Note: Homebrew will download and install Command Line Tools for Xcode 8.0 as part of the installation process.
@bcnzer
bcnzer / postman-pre-request.js
Last active April 30, 2024 21:20
Postman pre-request script to automatically get a bearer token from Auth0 and save it for reuse
const echoPostRequest = {
url: 'https://<my url>.auth0.com/oauth/token',
method: 'POST',
header: 'Content-Type:application/json',
body: {
mode: 'application/json',
raw: JSON.stringify(
{
client_id:'<your client ID>',
client_secret:'<your client secret>',
@tombigel
tombigel / README.md
Last active May 6, 2024 03:23 — forked from a2ikm/limit.maxfiles.plist
How to Change Open Files Limit on OS X and macOS Sierra (10.8 - 10.12)

How to Change Open Files Limit on OS X and macOS

This text is the section about OS X Yosemite (which also works for macOS Sierra) from https://docs.basho.com/riak/kv/2.1.4/using/performance/open-files-limit/#mac-os-x

The last time i visited this link it was dead (403), so I cloned it here from the latest snapshot in Archive.org's Wayback Machine https://web.archive.org/web/20170523131633/https://docs.basho.com/riak/kv/2.1.4/using/performance/open-files-limit/

Mac OS X

To check the current limits on your Mac OS X system, run:

@shilman
shilman / storybook-3.2-alpha.md
Last active April 17, 2019 00:15
Storybook 3.2-alpha Feedback

Storybook 3.2-alpha Feedback

We're rolling out a few big features in Storybook 3.2 and need your feedback:

  • Vue support
  • Story hierarchy

DISCLAIMERS: Our release process is for getting new features into your hands early to stabilize things. API's may change before full release!

FEEDBACK: To give feedback on a feature comment on the open issue linked below, and be sure to include the version you're using. To give feedback on the release, feel free to comment on this gist, or come chat with us on slack.

@matryer
matryer / term_context.go
Last active March 10, 2022 05:23
Making Ctrl+C termination cancel the context.Context
func main() {
ctx := context.Background()
// trap Ctrl+C and call cancel on the context
ctx, cancel := context.WithCancel(ctx)
c := make(chan os.Signal, 1)
signal.Notify(c, os.Interrupt)
defer func() {
signal.Stop(c)
@michalraska
michalraska / commit-msg
Last active October 19, 2020 16:45
Git commit msg with ticket id
#!/bin/sh
#
# Automatically adds branch name and branch description to every commit
# message.
#
COMMIT_EDITMSG=$1
addBranchName() {
NAME=$(git branch | grep '*' | sed 's/* //' | grep -Eo '[0-9]+')
DESCRIPTION=$(git config branch."$NAME".description)

Direct copy of pre-encoded file:

$ ffmpeg -i filename.mp4 -codec: copy -start_number 0 -hls_time 10 -hls_list_size 0 -f hls filename.m3u8