Skip to content

Instantly share code, notes, and snippets.

View pavlealeksic's full-sized avatar

Pavle Aleksic pavlealeksic

  • Novi Sad, Serbia
View GitHub Profile
@pavlealeksic
pavlealeksic / ba.sh
Created April 9, 2020 22:10 — forked from bvolpato/ba.sh
Install Chrome Driver with Xvfb (Ubuntu Server)
#!/bin/bash
# Chrome Repo
sudo apt-get install fonts-liberation xdg-utils libxss1 libappindicator1 libindicator7
wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
sudo dpkg -i google-chrome*.deb
sudo apt-get update
# Download
@pavlealeksic
pavlealeksic / crudhooksapp.txt
Last active November 3, 2019 13:16
React Native Hooks: To-Do App with CRUD Operations and AsyncStorage https://pajaaleksic.com/react-native-hooks-to-do-app-with-crud-operations-and-asyncstorage/
import React, {useState, useEffect} from 'react';
import {
View,
Text,
TextInput,
Keyboard,
ScrollView,
SafeAreaView,
TouchableOpacity,
} from 'react-native';
@pavlealeksic
pavlealeksic / sysctl.conf
Created July 4, 2019 11:56 — forked from voluntas/sysctl.conf
Sysctl configuration for high performance
### KERNEL TUNING ###
# Increase size of file handles and inode cache
fs.file-max = 2097152
# Do less swapping
vm.swappiness = 10
vm.dirty_ratio = 60
vm.dirty_background_ratio = 2
@pavlealeksic
pavlealeksic / gist:5d9e9e26637323f458423cd752827db4
Created May 9, 2019 03:13 — forked from luckydev/gist:b2a6ebe793aeacf50ff15331fb3b519d
Increate max no of open files limit in Ubuntu 16.04/18.04
# maximum capability of system
user@ubuntu:~$ cat /proc/sys/fs/file-max
708444
# available limit
user@ubuntu:~$ ulimit -n
1024
# To increase the available limit to say 200000
user@ubuntu:~$ sudo vim /etc/sysctl.conf
@pavlealeksic
pavlealeksic / interworx-access-iworx-db
Last active August 2, 2018 19:37 — forked from asyndesis/iw-access-iworx-db
Quick way to access InterWorx DB from terminal
mysql -u iworx -p -S /usr/local/interworx/mysql/iworx-db.sock -p`grep dsn.orig ~iworx/iworx.ini | cut -d : -f 3 | xargs -d @ | cut -d " " -f 1`