Skip to content

Instantly share code, notes, and snippets.

View socheatsok78's full-sized avatar
🖖
༼ つ ◕_◕ ༽つ is having a baby

Socheat Sok socheatsok78

🖖
༼ つ ◕_◕ ༽つ is having a baby
View GitHub Profile
@socheatsok78
socheatsok78 / InputDeviceReceiver.java
Last active May 22, 2017 02:25
Khmer Unicode Keyboard Layout for External/Physical Keyboard for Android devices, we've made the keyboard working with standard NiDA keyboard layout. But we still have problem on combining two unicode character key like "ុ" and "ំ" together in order to get "កុំ​" like word.
package kh.org.open.physicalkeyboard;
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
public class InputDeviceReceiver extends BroadcastReceiver {
@Override
public void onReceive(Context context, Intent intent) {
// Nothing to do at this time.
function GetRandomName() {
const nameLeft = [
"admiring",
"adoring",
"affectionate",
"agitated",
"amazing",
"angry",
"awesome",
"beautiful",
@socheatsok78
socheatsok78 / .gitconfig
Last active January 28, 2019 08:44
Git Alias
[alias]
ignore = "!gi() { curl -L -s https://www.gitignore.io/api/$@ ;}; gi"
accept-ours = "!f() { [ -z \"$@\" ] && set - '.'; git checkout --ours -- \"$@\"; git add -u -- \"$@\"; }; f"
accept-theirs = "!f() { [ -z \"$@\" ] && set - '.'; git checkout --theirs -- \"$@\"; git add -u -- \"$@\"; }; f"
"*":
"atom-ide-ui":
"atom-ide-code-format":
formatOnSave: true
core:
telemetryConsent: "no"
themes: [
"one-dark-ui"
"cobalt2-syntax"
]
@socheatsok78
socheatsok78 / bake.sh
Last active October 20, 2017 01:56
Home-made Baked bake.sh script for the day
function bake {
case $1 in
update)
echo "Checking for update...\n---"
sudo apt-get update -y
echo "\nAvailable update packages...\n---"
sudo apt list --upgradable ;;
upgrade)
echo "Upgrading new packages...\n---"
sudo apt-get dist-upgrade
@socheatsok78
socheatsok78 / install.sh
Created November 24, 2017 05:05 — forked from mkubenka/install.sh
OpenVPN Access Server Letsencrypt
#!/bin/sh
apt-get -y install git bc
git clone https://github.com/letsencrypt/letsencrypt /opt/letsencrypt
mkdir /etc/letsencrypt
@socheatsok78
socheatsok78 / README.md
Last active August 31, 2018 17:01
Add URL Handler to Visual Studio Code on Linux, vscode, code, linux

How to Install

  • Create vscode-url-handler in /usr/bin
  • Create vscode-url-handler.desktop in /usr/share/applications
  • Edit mimeappd.list in /usr/share/applications/mimeappd.list

Understand? Good!

@socheatsok78
socheatsok78 / README.md
Last active March 29, 2019 03:18
PWA with Laravel Mix, Webpack and Service Worker caching strategies
@socheatsok78
socheatsok78 / gapps-config-bacon.txt
Last active May 12, 2018 03:42
AOSP/LineageOS Gapps Config
Include
Override
# Test
GoogleAssistant
# Pico+
CalSync # Install Google Calendar Sync (except if Google Calendar is being installed)
DialerFramework # Install Dialer Framework
GoogleTTS # Install Google Text-to-Speech (Micro+ on 5.0-, Pico+ on 6.0+)
@socheatsok78
socheatsok78 / README.md
Created September 19, 2018 02:58
VueXPath - $x(path) returns an array of DOM elements that match the given XPath expression.

VueXPath

$x(path) returns an array of DOM elements that match the given XPath expression.

Requirement

npm install wicked-good-xpath

Install