Skip to content

Instantly share code, notes, and snippets.

View codenoid's full-sized avatar

Rubi codenoid

View GitHub Profile
@codenoid
codenoid / needed.sh
Created September 6, 2017 13:45
Crystal needed Library
sudo apt-get install \
libbsd-dev \
libedit-dev \
libevent-core-2.0-5 \
libevent-dev \
libevent-extra-2.0-5 \
libevent-openssl-2.0-5 \
libevent-pthreads-2.0-5 \
libgmp-dev \
libgmpxx4ldbl \
@codenoid
codenoid / puppeteer.run
Created September 6, 2017 10:24
Run Puppeteer
Works perfectly on ubuntu xenial - no gtk - remote - ssh - non root
Linux ip---- 4.4.0-1022-aws #31-Ubuntu SMP Tue Jun 27 11:27:55 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux
Ubuntu Xenial
update
sudp apt-get update
node v8.4.0
curl -sL https://deb.nodesource.com/setup_8.x | sudo -E bash - sudo apt-get install -y nodejs
Install npm
@codenoid
codenoid / nyemod.md
Last active September 11, 2017 07:53
Penggunaan Nyemod di blogger / wordpress
  1. buat widget baru, text/html | text/script
  2. masukkan kode dibawah ini
<script src="https://cdn.rawgit.com/codenoid/Nyemod/master/lib/nyemod.min.js"></script>
<script>
	Nyemod.init({
		click: 3, // total klik maksimal, dan akan di reset jika sudah melewati waktu
		interval: 23000 // reload time in ms
	});
# Check your passwords against https://haveibeenpwned.com/Passwords
# Usage:
# crystal run --release check_passwords.cr -- pwned-passwords*.txt
# Enter your passwords one per line, then press Return twice
require "digest/sha1"
my_passwords = Hash(String, String).new
until (line = gets || "").empty?
my_passwords[Digest::SHA1.hexdigest(line).upcase] = line
require "kemal"
require "jwt"
require "json"
require "yaml"
require "arangocr"
require "redis"
# Load .env file
env_data = YAML.parse File.read(".env.yml") rescue Hash(String, String).new
env_data.each { |k, v| ENV[k.to_s] = v.to_s }
[Unit]
Description=cargo_shorts
Documentation=https://github.com/Fryguy/cargo_shorts/blob/master/README.md
After=network.target
[Service]
Type=simple
WorkingDirectory=/opt/cargo_shorts
ExecStart=/opt/cargo_shorts/bin/cargo_shorts -p 80
Restart=on-failure
name: trypapierqt
version: 0.1.0
authors:
- <>
dependencies:
qt5:
github: Papierkorb/qt5.cr
branch: master-ready-to-use
@codenoid
codenoid / rubi.md
Last active August 27, 2017 08:26
Rubi's Productivity Starter Pack

Rubi's Productivity Starter Pack

  1. The rooms were busy (not sure)
  2. Bright / Light Space
  3. The room is not noisy
  4. With delicious coffee
  5. Fast internet connection, at least not make me wait until it becomes lazy
  6. A computer with good performance
  7. Still trying to recognize me.. ;)
@codenoid
codenoid / mru.md
Created August 27, 2017 08:05
:MRU

Overview

The Most Recently Used (MRU) plugin provides an easy access to a list of recently opened/edited files in Vim. This plugin automatically stores the file names as you open/edit them in Vim.

This plugin will work on all the platforms where Vim is supported. This plugin will work in both console and GUI Vim. This version of the MRU plugin needs Vim 7.0 and above. If you are using an earlier version of Vim, then you should use an older version of the MRU plugin.

@codenoid
codenoid / mongoso.md
Last active September 20, 2017 09:17
mongo.cr
export LD_LIBRARY_PATH=/usr/lib64/
export LD_RUN_PATH=/usr/lib64