Skip to content

Instantly share code, notes, and snippets.

#!/bin/sh -e
# ESET PROTECT
# Copyright (c) 1992-2021 ESET, spol. s r.o. All Rights Reserved
cleanup_file="$(mktemp -q)"
finalize()
{
set +e
if test -f "$cleanup_file"
then
{
"editor.tabSize": 2,
"editor.minimap.enabled": false,
"editor.fontFamily": "JetBrains Mono NL",
"editor.fontSize": 13,
"editor.scrollbar.horizontalScrollbarSize": 8,
"editor.scrollbar.verticalScrollbarSize": 8,
"files.insertFinalNewline": true,
"workbench.colorTheme": "Remedy - Dark (Tilted)",
"aws.profile": "profile:tl",
https://stars.github.com
Mockup Generator & Animator 3D - Rotato

Deploy Rails on Ubuntu

sudo adduser deploy
sudo adduser deploy sudo
sudo su - deploy

Node JS

curl -sL https://deb.nodesource.com/setup_12.x | sudo -E bash -
it "should call 'bar' with appropriate arguments" do
  expect(subject).to receive(:bar).with("an argument I want")
  subject.foo
end
@hieu-v
hieu-v / ransacker search full_name.md
Created August 10, 2020 13:25
ransacker search full name
ransacker :full_name do |parent|
  Arel::Nodes::NamedFunction.new('CONCAT_WS', [
    Arel::Nodes.build_quoted(' '), parent.table[:first_name], parent.table[:last_name]
  ])
end
sudo apt-get update
sudo apt-get install apt-transport-https ca-certificates curl gnupg-agent software-properties-common

curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -

sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"

sudo apt-get update
sudo apt-get install docker-ce docker-ce-cli containerd.io
git config --global http.postBuffer 524288000
@hieu-v
hieu-v / installing-libv8-on-mac-os-catalina.md
Last active June 30, 2020 01:36
installing-libv8-on-mac-os-catalina
$ brew install v8@3.15
$ gem install libv8 -v '3.16.14.19' -- --with-system-v8
Building native extensions with: '--with-system-v8'
This could take a while...
Successfully installed libv8-3.16.14.19
1 gem installed

$ gem install therubyracer -- --with-v8-dir=/usr/local/opt/v8@3.15
@hieu-v
hieu-v / Create a SOCKS proxy.md
Created June 3, 2020 01:58
Create a SOCKS proxy
sudo apt-get install openssh-server
sudo systemctl enable ssh
sudo systemctl start ssh


sudo ufw allow ssh
sudo ufw enable
sudo ufw status