Skip to content

Instantly share code, notes, and snippets.

View lnrsoft's full-sized avatar
🎯
Focusing

lnrsoft lnrsoft

🎯
Focusing
View GitHub Profile
@lnrsoft
lnrsoft / gist:c58d314dc0e7cf0223fc073a0984ea43
Created September 16, 2018 19:44
update-alternatives of clang on ubuntu
sudo update-alternatives --install /usr/bin/clang++ clang++ /usr/bin/clang++-3.9 100
sudo update-alternatives --install /usr/bin/clang++ clang++ /usr/bin/clang++-6.0 1000
sudo update-alternatives --install /usr/bin/clang++ clang /usr/bin/clang-3.9 100
sudo update-alternatives --install /usr/bin/clang clang /usr/bin/clang-3.9 100
sudo update-alternatives --install /usr/bin/clang clang /usr/bin/clang-6.0 1000
sudo update-alternatives --config clang
sudo update-alternatives --config clang++
######################################
# INSTALL OPENCV ON UBUNTU OR DEBIAN #
######################################
# | THIS SCRIPT IS TESTED CORRECTLY ON |
# |----------------------------------------------------|
# | OS | OpenCV | Test | Last test |
# |----------------|--------------|------|-------------|
# | Ubuntu 17.04 | OpenCV 3.4.1 | OK | 14 Mar 2018 |
# | Debian 9.3 | OpenCV 3.4.0 | OK | 17 Feb 2018 |
What it does
Monitoring your CPU temperature/utilization/frequency/power
Shows performance dips caused by thermal throttling
Requires minimal resources
Requires no X-server
Built in options for stressing the CPU (stress/stress-ng)
****************************************************************************************************************************************
Dependencies
@lnrsoft
lnrsoft / squirrel-sql.sh
Created July 13, 2018 21:44
OSX 10.13 $ ./squirrel-sql.sh Error: Could not find or load main class JavaVersionChecker
#! /bin/sh -x
ABSPATH=$(cd "$(dirname "$0")"; pwd)
# This function sets a global variable named "CP" to a command-path separated list of jars located beneath the
# specified folder. If the specified folder contains a lib directory, then jars beneath the lib folder are
# @ added as well as the squirrel-sql.jar file located in the directory specified as the first argument to
# this function.
buildCPFromDir()
{
@lnrsoft
lnrsoft / how to permamently disable OSX sleepimage
Created July 8, 2018 00:35
how to permamently disable OSX sleepimage
View the sleep image size
ls -lh /private/var/vm/sleepimage
Disable sleep mode:
sudo pmset -a hibernatemode 0
Remove the image:
sudo rm /private/var/vm/sleepimage
Create a 0-byte file:
@lnrsoft
lnrsoft / ftp-ubuntu.md
Created April 6, 2018 03:45 — forked from sergiohidalgo/ftp-ubuntu.md
Generar accesos FTP en Ubuntu con proftpd

Instalación

apt-get update
apt-get install proftpd

Ediar archivo de configuración

@lnrsoft
lnrsoft / using localhost as a ftp server
Created April 6, 2018 03:45 — forked from jahidHn/using localhost as a ftp server
How to setup ftp server in ubuntu
Command Line:
# Install Lamp
Configure for permission:
cd /var/www/html
sudo chown -R user:www-data /var/www/html/
sudo chmod -R 775 /var/www/html/
sudo chmod g+s /var/www/html/
#Install ftp [vsftpd]
@lnrsoft
lnrsoft / guide.md
Created April 6, 2018 03:45 — forked from anhphamt/guide.md
Install FTP on Ubuntu

#install config pure-db sudo apt-get install pure-ftpd

sudo groupadd ftpgroup

``

@lnrsoft
lnrsoft / sftp.md
Created April 6, 2018 03:45 — forked from vallettea/sftp.md
How to setup a secure ftp server on ubuntu.

Setting up ftp server on ubuntu

Install

apt-get install vsftpd openssh-server

Configure ftp

@lnrsoft
lnrsoft / fake_data.py
Created March 16, 2018 21:34
Random data generator using Python Faker package
from faker import Faker
fake = Faker()
#from faker.providers import BaseProvider
for _ in range(1000):
print('Username: ', fake.user_name())
print('Email: ', fake.free_email())
print('IP: ', fake.ipv4(network=False))
print('Time: ', fake.time(pattern="%H:%M:%S", end_datetime=None))
print('Date: ', fake.date_this_decade(before_today=True, after_today=False))