Iceland Trip - Feb'18


Dumping some of my old travel videos here quickly.[4K] Calm and snowy drive from Vik to Reykjavik timelapse with GoPro[4K] Reykjavik to Keflavik Ride GoPro timelapse with chill music and a little snow storm

Tom Clancy's The Division- Delta C 1-200 error fix


Open network and sharing center; Click on your network; Click on Properties button; Choose TCP/IPv4 and on Properties button; Enter Google’s dns: 8.8.8.8 and 4.4.4.4; Run cmd as administrator; Enter following commands: ipconfig /flushdn and press Enter. ipconfig /registerdns and press Enter ipconfig /release and press Enter. ipconfig /renew and press Enter. netsh winsock reset and press Enter. Reboot your computer. Turn off your firewall

Remove extra launcher activity which comes from the included library android


ProgressWheel’s example activity has launcher intent-filter so it creates two app icons in the applications drawer which is quite ugly.To eliminate this we need to remove the intent-filter from the example activity. We are going to use manifest merger of Android which is pretty cool. Android merges all of the manifest files and at the end creates one manifest file.It’s under intermediates -> manifests ->Don’t remove module name from .idea -> modules.xml it breaks everything. Bad bad bad. There is one solution in SO. Don’t do it.

Using vue.js with Jekyll - double curly brace problem


If you are go full serverless, means you need to do lots HTML templating and Javascript juggling. For making templating easier (of course you can always do single page with vue.js and vue-router but I don’t like it for SEO purposes), I started to use Jekyll’s liquid templating system with proper layouts and includes. However, liquid uses double curly braces for templating just like vue.js template delimiters. This means that liquid will strip out all my vue.js tags at the time of the generation. This ended up no vue rendering. In order to solve this problem: I tried changing Vue delimiters to [[ ]] instead of `` -> Sadly didn’t resolve.Vue.config.delimiters = ['$[', ']'] Not cool but I tried using `` tags of jekyll to let {{}} go without being stripped out. And it worked.{% raw %}<p>{{ title }}</p>in JS file:data: { title: 'Who let the dogs out'}

Making crontab send email through mailgun


I have 3 raspberry pis and they have some crons on it. Although this is nice, I have hard time to keep track of which pi does what and if its cron has successfully completed. Thankfully there is an easy solution for that: Send an email after every cron run with logs. However, ubuntu or jessie (pi version of linux) is not capable of sending emails out of box. At least as far as I understand that is the situation so we need a mail provider to send emails. I already have an account from mailgun so why not using it? Did some research and combined some short commands to achieve this.i assume here that you have opened a mailgun.org account and you use crontab as cron job tool on some debian backed environment. Install crontab if you do not have:sudo apt-get install crontab Check the cron jobs:crontab -l Add/Remove/Edit the cron jobs:crontab -e Install postfix for mail sending relaysudo apt-get -y install postfix Choose from the prompts Satellite system username: desired_username ...

Windows 10'da Ubuntu Bash modunu etkinleştirmek


Artık windows 10 ile beraber beta olarak ubuntu subsystem kullanabiliyoruz. Bu kesinlikle virtualbox ya da cygwin tarzı bi sanallaştırma değil daha native bir sistem. Uzun zamandır istenen bi özellikti ve sonunda Microsoft ekledi bunu. Aktifleştirmek çok kolay: Başlat (Win) -> Ayarlar (Settings) -> Update & security Gelişitiricler (For developers) -> Use developer features -> Geliştirici modu (Developer mode) Denetim masası (Control panel) -> Programlar (Programs) -> Turn on/off Windows features Yeniden başlat İlk çalıştırmada bash.exe yi kendiniz tetiklemeniz lazım. Başlat -> bash yazıp çalıştırın O sizi yönlendirecek ve bittiğinde artık başlat’a bash yazıp çalıştırabilirsiniz. gcc, apt-get, nano, ssh, python, grep, ack hemen hemen her şey var. Hızlı bi gcc örneği Dosyayı yarattouch hello.c İçine kodunu yaz:nano hello.c Aşağıdakini yapıştırın:/* Hello World program */#include<stdio.h>main(){ printf("Hello World");} GCC’yi ubuntuya kurar...

Google Cloud SDK - how to bring back dev_appserver.py


This weekend’s annoying problem is this. New gcloud SDK is great, it is installed through Ubuntu Software Center (apt-get) etc. However, when you install it like that, even though you can deploy the Google App Engine apps; you would not be able to run the local server to see your changes locally for the python GAE app. Example: Run the development server:dev_appserver.py main.app.yamlOutput: dev_appserver.py command not found List the components:gcloud components list│ Uninstalled │ gcloud app Python Extensions │ app-engine-python │ 6.1 MiB │ Install the python SDK to use dev_appserver.pygcloud components install app-engine-pythonOutput: You cannot perform this action because this Cloud SDK installation is managed by an external package manager. The reason is that it’s installed through apt-get, instead we should uninstall that version through apt and then reinstall in the old way.sudo apt-get updatesudo apt autoremove google-cloud-sdk Install in an old way, this will ask you...

Some nice #bash commands


#!/bin/bashMake all files lower case in the folder in linuxfor f in `find`; do mv -v "$f" "`echo $f | tr '[A-Z]' '[a-z]'`"; doneRename all files in the directory sequentiallya=1for i in *.mp4; do new=$(printf "%04d.mp4" "$a") #04 pad to length of 4 mv -- "$i" "$new" let a=a+1doneCheck if variable null (not set) or not if [ -z "$var" ] then echo "\$var is empty" fiFunction definitionmain (){ echo "This is a function" # Use the passed parameter in the function. echo "Passed parameter is $1"}main "first parameter"if-else conditionalsif [[ "$1" = "1" ]]; then echo "This is if"elif [[ "$1" = "2" ]]; then echo "This is elif"else echo "This is else"fiFormat current date and time in a nicelyecho "Recent logs are at logs_`date +%Y%m%d_%H%M%S`"Pipe both stderr and stdout to a filepython main.py 80 > logs_`date +%Y%m%d_%H%M%S` 2>&1 &

Install latest #nodejs on raspberry pi (#raspbian)


First add the source:curl -sL https://deb.nodesource.com/setup_7.x | sudo -E bash -Install just like normal - don’t install node which is different.sudo apt install nodejsNow you can use it just like normal nodejs, this should output something like 7.blahnode -vNPM comes for free as well.npm -v

Solving pip error: ImportError: cannot import name IncompleteRead


$ sudo pip uninstall wheezyTraceback (most recent call last): File "/usr/bin/pip", line 9, in <module> load_entry_point('pip==1.5.6', 'console_scripts', 'pip')() File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 356, in load_entry_point return get_distribution(dist).load_entry_point(group, name) File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 2476, in load_entry_point return ep.load() File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 2190, in load ['__name__']) File "/usr/lib/python2.7/dist-packages/pip/__init__.py", line 74, in <module> from pip.vcs import git, mercurial, subversion, bazaar # noqa File "/usr/lib/python2.7/dist-packages/pip/vcs/mercurial.py", line 9, in <module> from pip.download import path_to_url File "/usr/lib/python2.7/dist-packages/pip/download.py", line 25, in <module> from requests.compat import IncompleteReadImportError: cannot import name IncompleteReadJust re-inst...


subscribe via RSS