Skip to content

Instantly share code, notes, and snippets.

@hieuns
hieuns / .vimrc
Created April 19, 2021 04:30
Vimrc
set nocompatible
filetype off
set encoding=utf-8
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
Plugin 'gmarik/Vundle.vim'
Plugin 'kien/ctrlp.vim'
@hieuns
hieuns / rails_ssl.md
Created February 5, 2020 06:48
Run rails server in development environment with SSL
@hieuns
hieuns / install_godot.sh
Last active January 11, 2024 02:50
Install Godot Engine and create its .desktop file
#!/bin/bash
TMP_PATH="/tmp/godot.zip"
GODOT_LINK=$1
GODOT_DEST="/usr/bin"
GODOT_PATH="/usr/bin/godot"
ICON_DIR="/usr/share/icons/hicolor/scalable/apps"
ICON_PATH="$ICON_DIR/godot.svg"
ICON_URL="https://upload.wikimedia.org/wikipedia/commons/6/6a/Godot_icon.svg"
@hieuns
hieuns / item_type.rb
Created October 4, 2019 04:31
Use graphql-batch with graphql-ruby to resolve n + 1 issue
module Types
class ItemType < GraphQL::Schema::Object
field :id, ID, null: false
field :title, String, null: false
field :description, String, null: true
field :image_url, String, null: true
# (graphql-ruby 1.9.12)
# instead of using `resolve` inside block of `field` like this:
#
# field :user, Types::UserType, null: false do
@hieuns
hieuns / concat_mp4.sh
Last active January 31, 2020 14:46
ffmpeg commands collection
$ cat files.txt
file '/path/to/file1'
file '/path/to/file2'
file '/path/to/file3'
$ ffmpeg -f concat -safe 0 -i files.txt -c copy output.mp4
@hieuns
hieuns / atom-styles.less
Created June 29, 2018 03:47
Atom styles
atom-panel.modal:after {
background: rgba(22, 24, 29, 0.46);
}
@hieuns
hieuns / test_jquery.js
Last active March 12, 2018 03:24
Test jQuery
(function() {
$(function() {
console.log('test inaccessible code');
});
console.log('inaccessible');
}).call(this);
@hieuns
hieuns / t5enc.def
Created May 31, 2017 15:11
T5 encode for Vietnamese (Latex)
% Copyright 2000-2005 Werner Lemberg <wl@gnu.org> and
% Vladimir Volovich <vvv@vsu.ru>.
% This file is part of vntex. License: LPPL, version 1.3 or newer,
% according to http://www.latex-project.org/lppl.txt
%
%
% This is the file t5enc.def which provides T5 encoding for Vietnamese.
%
% written by Werner Lemberg <wl@gnu.org> and
% Vladimir Volovich <vvv@vsu.ru>
@hieuns
hieuns / atom-keymap.cson
Created May 25, 2017 01:04
Personal Atom keymap
# Your keymap
#
# Atom keymaps work similarly to style sheets. Just as style sheets use
# selectors to apply styles to elements, Atom keymaps use selectors to associate
# keystrokes with events in specific contexts. Unlike style sheets however,
# each selector can only be declared once.
#
# You can create a new keybinding in this file by typing "key" and then hitting
# tab.
#
@hieuns
hieuns / userContent.css
Last active March 4, 2020 00:44
Customize mention, reply badge (color, position) and avatar image in Chatwork
/* Customize mention, reply badge (color, position) and avatar image in Chatwork
put this in ~/.mozilla/firefox/<profile_directory>/chrome
*/
@-moz-document domain(www.chatwork.com) {
.messageBadge__avatar {
border-radius: 15px !important;
width: 16px !important;
height: 16px !important;
border: 1px solid #a484ec !important;