Skip to content

Instantly share code, notes, and snippets.

View aarestu's full-sized avatar
🌏
Focusing

restu suhendar aarestu

🌏
Focusing
View GitHub Profile
@aarestu
aarestu / web2app
Last active February 3, 2023 02:16
one command to install Nativefier, create desktop app for any web site also make shortcut icon for you [tested on Pop!_OS]
#!/bin/bash
if ! command -v node &> /dev/null
then
echo "nodejs could not be found"
sudo apt install -y nodejs
fi
if ! command -v npm &> /dev/null
then
from __future__ import print_function
import numpy as np
from keras import backend as K
from keras.preprocessing import sequence
from keras.models import Model, Sequential
from keras.layers import Dense, Dropout, Embedding, LSTM, Wrapper, Input
from keras.datasets import imdb
from keras.utils.generic_utils import has_arg
import copy
@aarestu
aarestu / install_python.sh
Created October 15, 2016 12:30 — forked from andriisoldatenko/install_python.sh
Install local Python 2.7.10 on CentOS 7
TMP_PATH=~/tmp_install_python
# Versions section
PYTHON_MAJOR=2.7
PYTHON_VERSION=$PYTHON_MAJOR.10
mkdir $TMP_PATH && cd $TMP_PATH
# Update yum and libraries
yum -y update
@aarestu
aarestu / youtube_id.js
Last active March 7, 2016 06:16
find all Youtube video ids in a string using a regex
function linkifyYouTubeURLs(text) {
var re = /https?:\/\/(?:[0-9A-Z-]+\.)?(?:youtu\.be\/|youtube(?:-nocookie)?\.com\S*?[^\w\s-])([\w-]{11})(?=[^\w-]|$)(?![?=&+%\w.-]*(?:['"][^<>]*>|<\/a>))[?=&+%\w.-]*/ig;
return text.replace(re,
'YouTube ID: $1');
}
@aarestu
aarestu / hello.js
Created February 9, 2015 00:34
Hello Js
console.log("Hello, world!")