Skip to content

Instantly share code, notes, and snippets.

View davychhouk's full-sized avatar
🚀
Flying high starts from the ground.

Davy Chhouk davychhouk

🚀
Flying high starts from the ground.
View GitHub Profile
@davychhouk
davychhouk / dvpeabody.zsh-theme
Created April 28, 2021 02:37
dvpeabody.zsh-theme
local user='dvls'
local pwd='%{$fg[blue]%}%2d%{$reset_color%}'
local return_code='%(?..%{$fg[red]%}%? ↵%{$reset_color%})'
local git_branch='$(git_prompt_status)%{$reset_color%}$(git_prompt_info)%{$reset_color%}'
ZSH_THEME_RVM_PROMPT_OPTIONS="i v g"
ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg[green]%}"
ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}"
ZSH_THEME_GIT_PROMPT_DIRTY=""
ZSH_THEME_GIT_PROMPT_CLEAN=""
@davychhouk
davychhouk / .alacritty.yml
Last active December 10, 2020 00:45
.alacritty.yml
# Configuration for Alacritty, the GPU enhanced terminal emulator
# Any items in the `env` entry below will be added as
# environment variables. Some entries may override variables
# set by alacritty it self.
env:
# TERM env customization.
#
# If this property is not set, alacritty will set it to xterm-256color.
#
set -g prefix C-a
set -g history-limit 4096
unbind-key C-b
# make tmux display things in 256 colors
set -g default-terminal "screen-256color"
# shorten command delay
@davychhouk
davychhouk / .zshrc
Last active December 10, 2020 01:32
.zshrc
# If you come from bash you might have to change your $PATH.
# export PATH=$HOME/bin:/usr/local/bin:$PATH
# Path to your oh-my-zsh installation.
export ZSH="/Users/star/.oh-my-zsh"
# Set name of the theme to load --- if set to "random", it will
# load a random theme each time oh-my-zsh is loaded, in which case,
# to know which specific one was loaded, run: echo $RANDOM_THEME
# See https://github.com/robbyrussell/oh-my-zsh/wiki/Themes
import { serve } from "https://deno.land/[email protected]/http/server.ts";
const s = serve({ port: 8080 });
console.log("http://localhost:8080/");
for await (const req of s) {
req.respond({ body: "Hello World! Hello Daseveny!\n" });
}
/**
* Which one came first? Hen or Egg?
*/
const justCurious = ['🥚', '🐔'].sort();
console.log('====================================');
console.log('Answer:');
console.log(justCurious[0], 'came first.');
console.log(justCurious[1], 'came after.');
console.log('====================================');
<h1 id="reg-form-success-text" style="display:none;">Your application is completed. Please check your email for more detail.</h1>
<script>
var onRegister = function(e) {
e.preventDefault()
// Google Form Information
var FORM_URL = 'https://docs.google.com/forms/u/0/d/e/1FAIpQLSe5fa8fV-HtWCr4JMPROA391M4pZHA8fBlOZgPxar39akAQhg/formResponse';
var NAME = 'entry.1807057167';
var EMAIL = 'emailAddress';
@davychhouk
davychhouk / Router.js
Created July 13, 2018 03:06
Tutorial of React Navigation
/*
*@flow
*/
import React from 'react';
import { Text, View, StyleSheet } from 'react-native';
import { createBottomTabNavigator } from 'react-navigation';
import Ionicons from 'react-native-vector-icons/Ionicons';
import Home from './components/Home';
import Shop from './components/Shop';
import Profile from './components/Profile';
@davychhouk
davychhouk / voice.m
Created June 5, 2018 08:08
react-native-voice ios release fix
#import "Voice.h"
#import <React/RCTLog.h>
#import <UIKit/UIKit.h>
#import <React/RCTUtils.h>
#import <React/RCTEventEmitter.h>
#import <Speech/Speech.h>
@interface Voice () <SFSpeechRecognizerDelegate>
@property (nonatomic) SFSpeechRecognizer* speechRecognizer;
@davychhouk
davychhouk / .eslintrc.json
Created May 3, 2018 14:54
ESLint Rule Recommend
{
"parser": "babel-eslint",
"parserOptions": {
"ecmaFeatures": {
"jsx": true
}
},
"plugins": ["react"],