Skip to content

Instantly share code, notes, and snippets.

View primayudantra's full-sized avatar
👋
Hi, Prima here!

Prima Yudantra primayudantra

👋
Hi, Prima here!
View GitHub Profile
@primayudantra
primayudantra / icu4c-63.md
Last active July 11, 2022 11:52
Fix icu4c issues and switch version to 63.1

Answer from : https://stackoverflow.com/a/55828190

Solution:

  1. cd to Homebrew's formula directory cd $(brew --prefix)/Homebrew/Library/Taps/homebrew/homebrew-core/Formula

  2. Find desired commit (version 63 for icu4c) to checkout git log --follow icu4c.rb

@fatihky
fatihky / multi-level-group-by.js
Last active May 13, 2022 12:41
multi level group by, lodash, collections
const _ = require('lodash')
function genrows(groups, groupKey) {
return _.toPairs(groups)
.map(([key, data]) => ({[groupKey]: key, data}))
}
function gengroups(arr, iteratee, key) {
const grouped = _.groupBy(arr, iteratee)
return genrows(grouped, key)
@moso
moso / app.js
Last active December 15, 2022 07:28
laravel-mix config
// jQuery import
global.jQuery = require('jquery');
var $ = global.jQuery;
window.$ = $;
// Bootstrap 4 depends on Popper.js
// Popper.js import
//import Popper from 'popper.js';
//window.Popper = Popper;
@eyecatchup
eyecatchup / mr.robot_season-2_easter-egg-sites.md
Last active April 4, 2024 10:39
A collection of "Mr. Robot" Season 2 Easter Egg Sites. #mrrobot #hackingrobot #robotegg
@djonsson
djonsson / install_elasticsearch_osx.md
Last active November 11, 2022 21:10
OS X installation instructions for Elasticsearch + Kibana + Marvel

What is this?

Following this guide will set up a local Elasticsearch with Kibana and Marvel using Homebrew and Homebrew Cask

Prerequisites

If you already have Java installed on your system, skip steps Install Cask and Install Java

If you already have Java and Homebrew installed on your system, skip steps Prerequisites, start at Install Elasticsearch and Kibana after running $ brew update

Install Homebrew

  • $ ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
@iamralch
iamralch / ssh_client.go
Last active April 16, 2023 03:09
SSH client in GO
package main
import (
"fmt"
"io"
"io/ioutil"
"net"
"os"
"strings"
@vsouza
vsouza / .bashrc
Last active June 14, 2024 08:45
Golang setup in Mac OSX with HomeBrew. Set `GOPATH` and `GOROOT` variables in zshell, fish or bash.
# Set variables in .bashrc file
# don't forget to change your path correctly!
export GOPATH=$HOME/golang
export GOROOT=/usr/local/opt/go/libexec
export PATH=$PATH:$GOPATH/bin
export PATH=$PATH:$GOROOT/bin
@thaJeztah
thaJeztah / docker-examples.md
Last active January 14, 2024 02:00
Some docker examples

Commit, clone a container

To 'clone' a container, you'll have to make an image of that container first, you can do so by "committing" the container. Docker will (by default) pause all processes running in the container during commit to preserve data-consistency.

For example;

docker commit --message="Snapshot of my container" my_container my_container_snapshot:yymmdd
@manjeshpv
manjeshpv / passport.js
Last active February 29, 2024 15:11
Passport.js using MySQL for Authentication with Express
// config/passport.js
// load all the things we need
var LocalStrategy = require('passport-local').Strategy;
var mysql = require('mysql');
var connection = mysql.createConnection({
host : 'localhost',
user : 'root',
@paambaati
paambaati / upload_demo_html.html
Last active March 28, 2021 14:55
Uploading files using NodeJS and Express 4
<html>
<body>
<form action="/upload" enctype="multipart/form-data" method="post">
<input type="text" name="title">
<input type="file" name="file">
<input type="submit" value="Upload">
</form>
</body>
</html>