Skip to content

Instantly share code, notes, and snippets.

View hungneox's full-sized avatar
✌️

Hung Neo hungneox

✌️
View GitHub Profile
@huytd
huytd / wordle.md
Last active November 1, 2024 05:07
Wordle in less than 50 lines of Bash

image

How to use:

./wordle.sh

Or try the unlimit mode:

@FreddieOliveira
FreddieOliveira / docker.md
Last active November 16, 2024 08:51
This tutorial shows how to run docker natively on Android, without VMs and chroot.

Docker on Android 🐋📱

Edit 🎉

All packages, except for Tini have been added to termux-root. To install them, simply pkg install root-repo && pkg install docker. This will install the whole docker suite, left only Tini to be compiled manually.


Summary

@ruizb
ruizb / advanced-example.md
Last active September 26, 2023 20:21
Reader monad example using fp-ts

The following section is not part of monet.js documentation, but I think it's worth showing how we can compose readers using fp-ts.

Reader composition

Let's say we have the following piece of code:

interface Dependencies {
  logger: { log: (message: string) => void }
 env: 'development' | 'production'

Data Ingestion with Apache Nifi

The goal is to design simple flows that can be used to ingest data from files by copying and moving files as well as using brokers to send file contents.

Setup

Apache Nifi

You can download Apache Nifi and install it into your machine. Note that the current Apache Nifi needs Java 8. Check the document to see if a minimum configuration should be made for your installation.

Start Nifi server

Creating your own Native Modules

Sometime when we need a specific way to interact with the phone or operator system which is various different between iOS and Android, that when we need to lean that responsibility to the OS it self.

In RN, most of the logic and UI, in the best way, must be consistent between platforms. So, In an advance level of bringing best user experience to end user, we need to create native module, that mean the leaning the logic to the Native Part. There are ton of article out there showing why and when we need to create a native module, I won't dive into explanation again. Instead, I will show you how can we create a native module that could be used in React native code. That mean, you write your Objective-C/Java code, and import and run it as a module in Javascript Code.

I will show you here the most basic way to create the most basic library, called: open https://google.com. It means, I want to open Google by using the default iOS/Android browser in a native way.

Creating re

@viettranx
viettranx / FreezeAndSeal.example.js
Created August 26, 2018 18:08
How to make a private variable in Class and prevent add/delete it with freeze and seal function.
// ES6
// A normal object
class iPhoneX {
secretName = 'iPhoneX'
constructor(price) {
this.price = price
}
setPrice = (value) => {
@devSarry
devSarry / Microsoft.PowerShell_profile.ps1
Last active February 28, 2018 10:10
Laravel Powershell Commands -- Place in %UserProfile%\My Documents\WindowsPowerShell\Microsoft.PowerShell_profile.ps1
function art($arg1,$arg2,$arg3,$arg4,$arg5) { php artisan $arg1 $arg2 $arg3 $arg4 $arg5}
function migrate () {
art migrate
}
function migrate:r () {
php artisan migrate:refresh; php artisan migrate --seed
}
function c:i () {
@posener
posener / go-shebang-story.md
Last active October 18, 2024 01:42
Story: Writing Scripts with Go

Story: Writing Scripts with Go

This is a story about how I tried to use Go for scripting. In this story, I’ll discuss the need for a Go script, how we would expect it to behave and the possible implementations; During the discussion I’ll deep dive to scripts, shells, and shebangs. Finally, we’ll discuss solutions that will make Go scripts work.

Why Go is good for scripting?

While python and bash are popular scripting languages, C, C++ and Java are not used for scripts at all, and some languages are somewhere in between.

@kmpm
kmpm / adding-pixel-to-raspbian-lite.md
Last active August 20, 2024 12:13
Adding PIXEL to Raspbian Lite

Adding PIXEL/GUI to Raspbian Lite

These 'notes' were primarily intended for my own consumption but since there have been surprisingly many comments to it over the years I wanted to do some updates and clarifications. Thanks for all comments.

These instructions will require you to have connection to internet from your pi, WiFi, Ethernet or by some other means like a 3G USB dongle or something.

Preparations

@BBlackwo
BBlackwo / kraken.fish
Created March 1, 2017 08:05
Open GitKraken from the terminal
## Forked from https://gist.github.com/dersam/0ec781e8fe552521945671870344147b
## Also received help from https://twitter.com/gitkraken/status/691675309725368321
## Open GitKraken using the current repo directory.
## This code is for fish shell. The same thing can be done in bash
## by creating an alias with the command below.
## `1>/dev/null` directs logs from the terminal
## `&` allows use of the same terminal instance to do other things