Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
global log
# Alienware 13 r2 linux usefull links
http://en.community.dell.com/owners-club/alienware/f/3746/t/19658690
https://wiki.archlinux.org/index.php/Alienware_13
http://askubuntu.com/questions/765838/cannot-enable-wifi-of-alienware-r2-on-ubuntu-16-04-lts
https://github.com/kvalo/ath10k-firmware
root@alex-Alienware-13-R2:/media/alex/C76B-8817/ath10k-firmware# cp -a QCA6174/ /lib/firmware/ath10k/QCA6174/
root@alex-Alienware-13-R2:/media/alex/C76B-8817/ath10k-firmware# echo "options ath10k_core skip_otp=y" | tee -a /etc/modprobe.d/ath10k.conf
```
sudo su
echo 'blacklist i2c_hid' >> /etc/modprobe.d/blacklist.conf
depmod -a
update-initramfs -u
```
```
sudo apt-get purge nvidia*
sudo apt-get purge bumblebee* primus
sudo add-apt-repository ppa:graphics-drivers/ppa
sudo apt-get update
sudo apt-get install nvidia-352 nvidia-prime
sudo add-apt-repository -r ppa:bumblebee/stable
xrandr --output eDP-1 --auto --primary --output HDMI-0 --auto --left-of eDP-1
```
# Docker
## List of committed images
```$ docker images```
## Get image
Build from docker file
```docker build -f ./Dockerfile .```
Pull from dockerhub
```docker pull ovvasyliev/opensdl-docker```
## List of docker containers and history of theis execution
```docker ps -a```
## Run image ( create new container from image)
```docker run -d {image name}```
Not that it prints container hash
## Attach to running container
docker exec -i -t ${Hash} /bin/bash
Issue of invalid term type :
https://github.com/docker/docker/issues/9299
Solution
```export TERM=xterm```
### Function for easy attach
dconnect() {
docker exec -it $1 /bin/bash
}
## Commit container state ( create image from container)
```docker commit ${CONTAINER_ID} ${NEW_IMAGE_NAME}```
## Mount volume
example :
```
docker run -d -v `pwd`:/root/sdl sdl
```
## Stop container
docker stop ${container id}
## Remove all containers and images
docker rm $(docker ps -a -q)
docker rmi $(docker images -q)
#Lighttable
like sublime IDE
Open a terminal and use the following commands:
sudo add-apt-repository ppa:dr-akulavich/lighttable
sudo apt-get update
sudo apt-get install lighttable-installer
Once installed, you can look for Light Table in Unity Dash and run it.
To uninstall Light Table installed via the above PPA, use the commands below:
sudo apt-get remove lighttable-installer
sudo add-apt-repository --remove ppa:dr-akulavich/lighttable
# HDMI to VGA (USB Type-C to VGA)
$13.34 https://ru.aliexpress.com/item/HDMI-TO-VGA-Converter-box-hdmi-to-vga-audio-adapter-RCA-3-5mm-Stereo-Audio-and/32247956757.html?spm=2114.03010208.3.353.0oCdjR&ws_ab_test=searchweb0_0,searchweb201602_5_10065_10068_10000007_10084_10083_10080_10082_10081_10060_10061_10062_10056_10055_10054_10059_10099_10078_10079_10093_10073_10097_10100_10096_10070_10052_423_10050_424_10051,searchweb201603_6&btsid=18d90398-91ff-4917-9d98-c19d70d14fdc
$13.32 https://ru.aliexpress.com/item/High-Quaility-HDMI-to-VGA-Converter-with-Audio-Video-Converter-HDMI-Adapter-for-PC-Laptop/32737221391.html?spm=2114.03010208.3.301.DEevCO&ws_ab_test=searchweb0_0,searchweb201602_5_10065_10068_10000007_10084_10083_10080_10082_10081_10060_10061_10062_10056_10055_10054_10059_10099_10078_10079_10093_10073_10097_10100_10096_10070_10052_423_10050_424_10051,searchweb201603_6&btsid=c32827f8-af89-4b01-9ad5-b275afbd3b1a
$24.85 https://ru.aliexpress.com/item/Electronic-2014-New-Vention-HDMI-to-VGA-Converter-With-RCA-Audio-Cable-Video-Converter/32724815868.html?spm=2114.03010208.3.310.KefOWj&ws_ab_test=searchweb0_0,searchweb201602_5_10065_10068_10000007_10084_10083_10080_10082_10081_10060_10061_10062_10056_10055_10054_10059_10099_10078_10079_10093_10073_10097_10100_10096_10070_10052_423_10050_424_10051,searchweb201603_6&btsid=1947eb30-9466-448d-a39a-b068c15d6330
$46.15 https://www.aliexpress.com/item/Universal-1080P-HDMI-Digital-Audio-Decoder-HDMI-TO-HDMI-VGA-SPDIF-5-1CH-RCA-Digital-Multi/32580053057.html?spm=2114.01010208.3.27.SGuS35&ws_ab_test=searchweb0_0,searchweb201602_5_10065_10068_10000007_10084_10083_10080_10082_10081_10060_10061_10062_10056_10055_10054_10059_10099_10078_10079_10073_10097_10100_10096_10070_10052_423_10050_10051_424,searchweb201603_6&btsid=0c87dadc-4ddb-4a06-a2f5-0c69cf9b070f
$89.99 https://www.aliexpress.com/item/USB-3-1-Type-C-USB-C-to-Universal-Docking-Station-7-Port-HUB-HDMI-VGA/32680227013.html?spm=2114.01010208.3.292.IOHrk0&ws_ab_test=searchweb0_0,searchweb201602_5_10065_10068_10000007_10084_10083_10080_10082_10081_10060_10061_10062_10056_10055_10054_10059_10099_10078_10079_10073_10097_10100_10096_10070_10052_423_10050_10051_424,searchweb201603_6&btsid=a4a8bdaf-1139-44d6-918f-592df6e8ee9d
$179.00 http://plugable.com/products/ud-ultcdl/
#Gnome 3 javascript
imports.ui.main.legacyTray.actor.navigate_focus(null, Gtk.DirectionType.LEFT, false)
https://github.com/jonnylamb/shell-hide-legacy-tray/pull/8/
https://github.com/alexkutsan/ToggleLegacyTrayAppearance
# Sublime clang C++
https://habrahabr.ru/post/167353/
http://docs.sublimetext.info/en/latest/reference/keyboard_shortcuts_osx.html#navigation-goto-anywhere
#Gedit tips
gedit-plugins
Press Ctrl+Alt+B, or click Edit ▸ Toggle Bookmark.
Press Ctrl+B to move to the next bookmark.
Press Ctrl+Shift+B to move to the previous bookmark.
To add a comment, click Edit ▸ Comment Code, or press Ctrl+M.
To remove a comment, click Edit ▸ Uncomment Code, or press Shift+Ctrl+M.
Ctrl + . - command mode
Move the cursor to a certain line number in your file
go [line number] or just g [line number]
Toggle the bookmark indicator for the current line
bookmark or just b
Ctrl + F9 - terminal
Ctrl+Shift+C - Multiedit
Place your cursor at your first desired editing point.
Press Ctrl+E.
Move to your next editing point, and press Ctrl+E again.
Continue inserting editing points, adding as many as you need.
Ctrl+Alt+O, or by selecting File ▸ Quick Open.
#Telegram ubuntu
Для установки Telegram, наберите в консоли:
sudo add-apt-repository ppa:costales/unity-webapps-telegram
sudo apt-get update && sudo apt-get install unity-webapps-telegram
Для удаления Telegram, наберите:
sudo apt-get remove unity-webapps-telegram ;
sudo apt-get install ppa-purge ;
sudo ppa-purge ppa:costales/unity-webapps-telegram
# Static code analyses
sudo update-alternatives --install /usr/bin/clang++ clang++ /usr/bin/clang++-3.8 100
# Grep and its friends
pgrep -a : process grep
zipgrep, zfgrep, bzfgrep, xzfgrep : grep in archives
ssgrep : exel parse
#Parce binary protocol
http://kaitai.io/
# Github python API #
sudo pip3 install --pre github3.py
sudo pip install RandomWords
# POCO library
Good config implementation
# SDL plugins #
Below is the list of quite interesting presentation regarding modular apps and ways to achieve modularity
1) Might be useful to understand the idea of Modular App
http://www.slideshare.net/daniele77/going-native-with-less-coupling
http://www.slideshare.net/daniele77/dependency-injection-in-c-community-days-2015
2) [Rus, but picture and code in Eng] Good presentation about DI and Modular Apps with code samples (Boost.DI, Fruit and some other)
http://www.slideshare.net/sermp/dependency-injection-45485377
Frameworks
1) Wallaroo (C++11, seems abandoned)
Page: http://wallaroolib.sourceforge.net/
2) Hypodermic (C++11, seems abandoned)
Source: https://github.com/ybainier/Hypodermic
3) Fruit DI framework (c++11)
Source https://github.com/google/fruit
Doc https://github.com/google/fruit/wiki
Looks promising.
4) Boost.DI (c++14)
Source https://github.com/boost-experimental/di
Looks really great, but c++14 might prevent usage.
# On-line compilers #
https://meetingcpp.com/index.php/br/items/collaborative-online-c-compiler.html
# Plant UML #:
https://www.planttext.com/
Proxy
===============
http://stackoverflow.com/questions/32203610/how-to-integrate-uml-diagrams-into-gitlab-or-github
http://www.plantuml.com/plantuml/proxy?src=https://raw.github.com/plantuml/plantuml-server/master/src/main/webapp/resource/test2diagrams.txt
http://uml.mvnsearch.org/
http://uml.mvnsearch.org/index_github.jsp
#Python vector graphics#
import cairo
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.