Skip to content

Instantly share code, notes, and snippets.

View lnrsoft's full-sized avatar
🎯
Focusing

lnrsoft lnrsoft

🎯
Focusing
View GitHub Profile
@lnrsoft
lnrsoft / mysql-reset-root-pw.sh
Last active October 25, 2016 01:24 — forked from sorohan/mysql-reset-root-pw.sh
Reset mysql root password on unix without needing old password.
#!/bin/bash
MYSQL_ROOT_PASSWORD=$1
if [ -z "$MYSQL_ROOT_PASSWORD" ]; then
echo 'Missing required $1 (password).'
exit 1
fi
# check if mysql is running now.
@lnrsoft
lnrsoft / refind-setup.md
Last active March 16, 2017 23:16 — forked from Brainiarc7/refind-setup.md
Setting up rEFInd on Ubuntu 16.04 LTS for multi-boot purposes with secure boot enabled.

Deploying rEFInd on Ubuntu 16.04 LTS with secure boot enabled

You can install rEFInd from a PPA:

$ sudo apt-add-repository ppa:rodsmith/refind
$ sudo apt-get update
$ sudo apt-get install refind

It will recommend doing so to the ESP, accept the default.

@lnrsoft
lnrsoft / how-to-install-latest-gcc-on-ubuntu-lts.txt
Created March 22, 2017 23:29 — forked from application2000/how-to-install-latest-gcc-on-ubuntu-lts.txt
How to install latest gcc on Ubuntu LTS (12.04, 14.04, 16.04)
These commands are based on a askubuntu answer http://askubuntu.com/a/581497
To install gcc-6 (gcc-6.1.1), I had to do more stuff as shown below.
USE THOSE COMMANDS AT YOUR OWN RISK. I SHALL NOT BE RESPONSIBLE FOR ANYTHING.
ABSOLUTELY NO WARRANTY.
If you are still reading let's carry on with the code.
sudo apt-get update && \
sudo apt-get install build-essential software-properties-common -y && \
sudo add-apt-repository ppa:ubuntu-toolchain-r/test -y && \
@lnrsoft
lnrsoft / gcc-default-fix.sh
Created May 11, 2017 08:37 — forked from alghanmi/gcc-default-fix.sh
Change the default g++ compiler on MacOS to be the brew version
#
# Make gcc-4.8 the default compiler
# brew installs gcc-4.8, but does not create symlinks for it to be used
# without the version number.
# This script:
# 1. Generate symlinks for all gcc tools installed by brew
# 2. Make brew-installed software the first in path
#
BREW_CMD="brew"
@lnrsoft
lnrsoft / jmeter-server.sh
Created June 11, 2017 18:17 — forked from kamermans/jmeter-server.sh
Apache Jmeter Server init script for Ubuntu/Debian (tested on jmeter 2.6 and 2.7)
#!/bin/sh
### BEGIN INIT INFO
# Provides: jmeter-server
# Required-Start: $syslog $local_fs
# Required-Stop: $syslog $local_fs
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Apache JMeter Remote Server
# Description: Apache JMeter Remote Server runs JMeter tests issued from a remote server.
### END INIT INFO
@lnrsoft
lnrsoft / README.md
Created September 18, 2017 19:28 — forked from mmasashi/README.md
Install Oracle instant client (sqlplus) v12.1 on MacOSX

Install Oracle instant client (sqlplus) on MacOSX

  1. Get Oracle instant client for MacOSX
  1. Unarchive downloaded zip files into a same directory
  • ex: $HOME/Downloads/instantclient_12_1
  1. Create install.sh and copy the following code and past it on that file.
@lnrsoft
lnrsoft / stream_to_akamai.md
Created January 12, 2018 11:27 — forked from mmcc/stream_to_akamai.md
Stream directly to Akamai

Directly push to Akamai with FMLE

Assuming you already have the appropriate Akamai credentials, you should have some information like this:

Primary: rtmp://p.ep12345.i.akamaientrypoint.net/EntryPoint
Backup:  rtmp://b.ep12345.i.akamaientrypoint.net/EntryPoint
User: ######
Pass: ******
Stream: [EVENT_ANGLE_BITRATE]@12345

Playback: http://zencoder_hd1_1-lh.akamaihd.net/[EVENT_ANGLE_BITRATE]@12345

@lnrsoft
lnrsoft / MC Cheat Sheet
Created February 9, 2018 19:49 — forked from samiraguiar/MC Cheat Sheet
Midnight Commander Cheat Sheet
Shortcut Description
---------------------------------------------------------------
C-o Drop to the console
Insert Select/deselect file
* Invert selection on files
+ Specify file selection options (including custom pattern)
- The same as above, but for deselecting
F5/F6 Copy/move selected files
@lnrsoft
lnrsoft / XR2.control.m
Created February 9, 2018 22:06 — forked from alexymik/XR2.control.m
Matlab code to control XR-2 Robotic Arm with an Xbox 360 controller
% Values you will most likely want to change:
ROBOT_STEPS = 20;
COM_PORT = 'COM9';
POLL_RATE = 0.1;
% Set up joystick
disp('Connecting to Xbox Controller... ');
XBOX_CONTROLLER = vrjoystick(1);
disp(caps(XBOX_CONTROLLER));
%disp(INSTRFIND);
@lnrsoft
lnrsoft / XR2.control.m
Created February 9, 2018 22:06 — forked from alexymik/XR2.control.m
Matlab code to control XR-2 Robotic Arm with an Xbox 360 controller
% Values you will most likely want to change:
ROBOT_STEPS = 20;
COM_PORT = 'COM9';
POLL_RATE = 0.1;
% Set up joystick
disp('Connecting to Xbox Controller... ');
XBOX_CONTROLLER = vrjoystick(1);
disp(caps(XBOX_CONTROLLER));
%disp(INSTRFIND);