Skip to content

Instantly share code, notes, and snippets.

View icharge's full-sized avatar

Norrapat Nimmanee icharge

View GitHub Profile
@kaaquist
kaaquist / podman_macos.md
Last active May 4, 2024 22:37
Podman with docker-compose on MacOS.

Podman with docker-compose on MacOS.

Podman an alternative to Docker Desktop on MacOS

Getting podman installed and started is super easy.
Just use brew to install it.

> brew install podman

Now since podman uses a VM just like the Docker Client on MacOS we need to initialize that and start it.

@romkatv
romkatv / install_meslo_wsl.sh
Last active September 9, 2023 08:53
Install Meslo Powerline font family on Windows
#!/bin/bash
#
# This script installs patched Meslo Powerline font family on Windows.
# The fonts are installed for the current user only. The script must be
# run from WSL.
#
# bash -c "$(curl -fsSL https://gist.githubusercontent.com/romkatv/aa7a70fe656d8b655e3c324eb10f6a8b/raw/install_meslo_wsl.sh)"
#
# If you just want the font files, they are in
# https://github.com/romkatv/dotfiles-public/tree/master/.local/share/fonts/NerdFonts.
@bittner
bittner / keyboard-keys.md
Created February 28, 2019 22:50
Keyboard keys markup in MarkDown

Ctrl + Alt + Space

// Builders
class SimpleBuilder {
constructor(private current = {}) {
}
prop(key: string, value: any) {
return new SimpleBuilder({ ...this.current, ...{ [key]: value } });
}
@akexorcist
akexorcist / index.js
Last active November 17, 2022 11:25
Axios post method requesting with x-www-form-urlencoded content type. See https://axios-http.com/docs/urlencoded
const axios = require('axios')
/* ... */
const params = new URLSearchParams()
params.append('name', 'Akexorcist')
params.append('age', '28')
params.append('position', 'Android Developer')
params.append('description', 'birthdate=25-12-1989&favourite=coding%20coding%20and%20coding&company=Nextzy%20Technologies&website=http://www.akexorcist.com/')
params.append('awesome', true)
@xonlly
xonlly / jsconfig.json
Created September 7, 2017 14:09
jsconfig for react jsx project
{
"compilerOptions": {
"jsx": "react",
// This must be specified if "paths" is set
"baseUrl": ".",
// Relative to "baseUrl"
"paths": {
// exemple: "*": ["*", "web_modules/*", "web_modules/shared/*", "test/*"]
}
}
import React from "react";
import ResizeObserver from "resize-observer-polyfill";
import shallowEqual from "fbjs/lib/shallowEqual";
export default class PausableMeasure extends React.Component {
node = null;
state = {bounds: null};
componentWillMount() {
if (!this.props.dontMeasure) this.setup();
@iffy
iffy / .gitignore
Last active April 17, 2024 07:19
Example using electron-updater with `generic` provider.
node_modules
dist/
yarn.lock
wwwroot
@digulla
digulla / DangerousPathChecker.java
Last active August 31, 2023 19:14
How to check whether a file is on a network share with Java
/** Copyleft (C) 2016 by Aaron Digulla. Use as you wish. This copyright notice can be removed. */
package bug507401;
import java.io.BufferedReader;
import java.io.File;
import java.io.InputStreamReader;
import java.util.Arrays;
import java.util.List;
@wavezhang
wavezhang / java_download.sh
Last active April 29, 2024 14:42
download java from oracle without login
wget -c --no-cookies --no-check-certificate --header "Cookie: oraclelicense=accept-securebackup-cookie" https://download.oracle.com/otn-pub/java/jdk/12.0.2+10/e482c34c86bd4bf8b56c0b35558996b9/jdk-12.0.2_linux-x64_bin.tar.gz