Skip to content

Instantly share code, notes, and snippets.

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

Ngoc L.B. lbngoc

🏠
Working from home
View GitHub Profile
@huytd
huytd / wordle.md
Last active August 27, 2024 20:38
Wordle in less than 50 lines of Bash

image

How to use:

./wordle.sh

Or try the unlimit mode:

@dragolabs
dragolabs / ubuntu-vnc-without-monitor.md
Created April 29, 2020 20:09
Run VNC without connected monitor to ubuntu Desktop

Install Video Dummy Package

sudo apt-get install xserver-xorg-video-dummy

Create Default X Windows Configuration File

Create / Edit xorg.conf file Rename file if already exists for backup

@dennysjmarquez
dennysjmarquez / index.html
Created February 25, 2020 13:45
Web Share API + AddThis Sharing Buttons
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width = device-width,initial-scale = 1.0">
<title>Web Share API + AddThis Sharing Buttons</title>
<meta name="description" content="Learn how to use Web Share API with conditional AddThis Sharing Buttons">
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.0.13/css/all.css" integrity="sha384-DNOHZ68U8hZfKXOrtjWvjxusGo9WQnrNx2sqG0tfsghAvtVlRW3tvkXWZh58N9jp" crossorigin="anonymous">
<button id="shareButton" onclick="share(this)">
<i class="fas fa-share-alt"></i>
@sagrawal31
sagrawal31 / events.ts
Last active January 26, 2024 13:22
Alternative to Events which got removed in Ionic 5
import {Injectable} from '@angular/core';
import {Subject, Subscription} from 'rxjs';
/**
* A custom Events service just like Ionic 3 Events https://ionicframework.com/docs/v3/api/util/Events/ which got removed in Ionic 5.
*
* @author Shashank Agrawal
*/
@Injectable({
providedIn: 'root'
@Sroose
Sroose / no-arrow.directive.ts
Last active July 12, 2022 09:01
Ionic Angular directive to remove the arrow from an ion-select (and make placeholder look same as other elements)
/**
* Author: Sam Roose
*/
import { Directive, ElementRef } from '@angular/core';
@Directive({
selector: '[appNoArrow]'
})
export class NoArrowDirective {
@szepnapot
szepnapot / ADBCheatSheet.md
Last active August 18, 2023 09:44 — forked from HugoMatilla/ADBCheatSheet.md
ADB Cheat Sheet

CONFIG

Include adb and other android tools on your path

In Users/hugomatilla.bash_profile add export PATH=$PATH:/Users/hugomatilla/Documents/AndroidSDKs/sdk/platform-tools export PATH=$PATH:/Users/hugomatilla/Documents/AndroidSDKs/sdk/tools

My own adb location

cd /Users/hugomatilla/Documents/AndroidSDKs/sdk/platform-tools

START

@ibraheem4
ibraheem4 / postgres-brew.md
Last active September 13, 2024 11:16 — forked from sgnl/postgres-brew.md
Installing Postgres via Brew (OSX)

Installing Postgres via Brew

Pre-Reqs

Brew Package Manager

In your command-line run the following commands:

  1. brew doctor
  2. brew update
@SanderTheDragon
SanderTheDragon / postman-deb.sh
Last active August 21, 2024 11:40
A shellscript to create a Postman .deb file, for simple installation on Debian-based Linux distro's. Also creates a .desktop file.
#!/bin/sh
# SPDX-FileCopyrightText: 2017-2024 SanderTheDragon <sanderthedragon@zoho.com>
#
# SPDX-License-Identifier: MIT
arch=$(dpkg --print-architecture)
echo "Detected architecture: $arch"
case "$arch" in
@brablc
brablc / dnsmasq macOS.md
Last active September 24, 2021 10:24 — forked from ogrrd/dnsmasq OS X.md
Setup dnsmasq on OS X

Never touch your local /etc/hosts file in OS X again

To setup your computer to work with *.test domains, e.g. project.test, awesome.test and so on, without having to add to your hosts file each time.

Requirements

Install

@litoarias
litoarias / Fastfile
Last active February 10, 2023 07:23
Fastlane generator IPA Enterprise and Build Cordova project
fastlane_version "1.111.0"
scheme = "YOur scheme project"
configuration = "Release" # Debug or Release
project_name = "Your Project Name"
export_method = "enterprise" # app-store, ad-hoc, package, enterprise, development, developer-id
timestamp = Date.parse(Time.now.to_s)
ipa_name = "#{project_name}_#{timestamp}.ipa"