Skip to content

Instantly share code, notes, and snippets.

View application2000's full-sized avatar
💡
You Found Your Solution.

Mr Alexandre ELISÉ application2000

💡
You Found Your Solution.
View GitHub Profile
@application2000
application2000 / solution-to-udevd-bug-after-ubuntu-server-lts-upgrade.txt
Created August 5, 2016 17:46
Solution for udevd bug after upgrade from Ubuntu Server 14.04 LTS to 16.04 LTS
English
=======
Solution for udevd bug after upgrade from Ubuntu Server 14.04 LTS to 16.04 LTS
After upgrading to 16.04, just type and execute this command in the terminal.
sudo ln -s /lib/systemd/systemd-udevd /sbin/udevd
DISCLAIMER : Warning! Use this at your own risk.
@application2000
application2000 / latency.markdown
Created January 3, 2017 20:38 — forked from hellerbarde/latency.markdown
Latency numbers every programmer should know

Latency numbers every programmer should know

L1 cache reference ......................... 0.5 ns
Branch mispredict ............................ 5 ns
L2 cache reference ........................... 7 ns
Mutex lock/unlock ........................... 25 ns
Main memory reference ...................... 100 ns             
Compress 1K bytes with Zippy ............. 3,000 ns  =   3 µs
Send 2K bytes over 1 Gbps network ....... 20,000 ns  =  20 µs
SSD random read ........................ 150,000 ns  = 150 µs

Read 1 MB sequentially from memory ..... 250,000 ns = 250 µs

@application2000
application2000 / regex_from_object_to_array_accessing.txt
Created January 30, 2017 12:15
PhpStorm regex to replace PHP object-like accessing to PHP array-like accessing
Do you keep modifiying $my_variable->foo to $my_variable['foo'] over and over everyday? This regex is for you.
text to replace : (\$some_variable)(\->)([\w]+)
replacement : $1\[\'$3\'\]
Backup your files to prevent any problems. Use this with caution. At your own risk.
Usage:
1. Keyboard shortcut Cmd + R or equivalent to trigger a text replace
2. Click on the regex checkbox
@application2000
application2000 / how-to-install-latest-gcc-on-ubuntu-lts.txt
Last active February 21, 2024 03:02
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 && \