mimeapps.list içine [Added Associations] altında bir satıra
aşağıdaki satırı ekle
x-scheme-handler/phpstorm=phpstorm-php.desktop
phpstorm-php.desktop içeriği
[Desktop Entry]
Type=Application
Name=PHPStorm IDE
| Some possible implementations of the Bresenham Algorithms in C. | |
| The Bresenham line algorithm is an algorithm which determines which points in an | |
| n-dimensional raster should be plotted in order to form a close approximation | |
| to a straight line between two given points. | |
| It is commonly used to draw lines on a computer screen, as it uses only integer | |
| addition, subtraction and bit shifting, all of which are very cheap operations | |
| in standard computer architectures. | |
| It is one of the earliest algorithms developed in the field of computer graphics. | |
| A minor extension to the original algorithm also deals with drawing circles. |
| # gcc -Wall -o match match.c && ./match | |
| # | |
| #include <stdio.h> | |
| #include <string.h> | |
| #include <regex.h> | |
| server { | |
| listen 80; | |
| server_name www.example.com example.com; | |
| # Redirect all traffic to SSL | |
| rewrite ^ https://$host$request_uri? permanent; | |
| } | |
| server { | |
| listen 443 ssl default_server; |
| xstat() { | |
| for target in "${@}"; do | |
| inode=$(ls -di "${target}" | cut -d ' ' -f 1) | |
| fs=$(df "${target}" | tail -1 | awk '{print $1}') | |
| crtime=$(sudo debugfs -R 'stat <'"${inode}"'>' "${fs}" 2>/dev/null | | |
| grep -oP 'crtime.*--\s*\K.*') | |
| printf "%s\t%s\n" "${crtime}" "${target}" | |
| done | |
| } |
| # This is just a cheat sheet: | |
| # On production | |
| sudo -u postgres pg_dump database | gzip -9 > database.sql.gz | |
| # On local | |
| scp -C production:~/database.sql.gz | |
| dropdb database && createdb database | |
| gunzip < database.sql.gz | psql database |
| <?php | |
| require_once __DIR__.'/V8JsNodeModuleLoader_FileAccessInterface.php'; | |
| require_once __DIR__.'/V8JsNodeModuleLoader_NormalisePath.php'; | |
| /** | |
| * Simple Node.js module loader for use with V8Js PHP extension | |
| * | |
| * This class understands Node.js' node_modules/ directory structure | |
| * and can require modules/files from there. | |
| * |
mimeapps.list içine [Added Associations] altında bir satıra
aşağıdaki satırı ekle
x-scheme-handler/phpstorm=phpstorm-php.desktop
phpstorm-php.desktop içeriği
[Desktop Entry]
Type=Application
Name=PHPStorm IDE
| #!/bin/bash | |
| # Install dependencies only for Docker. | |
| [[ ! -e /.dockerinit ]] && exit 0 | |
| set -xe | |
| # Update packages and install composer and PHP dependencies. | |
| apt-get update -yqq | |
| apt-get install git libcurl4-gnutls-dev libicu-dev libmcrypt-dev libvpx-dev libjpeg-dev libpng-dev libxpm-dev zlib1g-dev libfreetype6-dev libxml2-dev libexpat1-dev libbz2-dev libgmp3-dev libldap2-dev unixodbc-dev libpq-dev libsqlite3-dev libaspell-dev libsnmp-dev libpcre3-dev libtidy-dev phpunit -yqq |
| # This xorg configuration file will start a dummy X11 server. | |
| # move it to /etc/X11/xorg.conf | |
| # don't forget apt install xserver-xorg-video-dummy; | |
| # based on https://xpra.org/Xdummy.html | |
| Section "ServerFlags" | |
| Option "DontVTSwitch" "true" | |
| Option "AllowMouseOpenFail" "true" | |
| Option "PciForceNone" "true" | |
| Option "AutoEnableDevices" "false" |
| def distance(lt1,ln1, lt2,ln2, in_meters = True): | |
| """ | |
| distance between two coordinates in meters | |
| or in | |
| """ | |
| R = 6371000 # earth radius | |
| theta1 = lt1 * PI / 180 | |
| theta2 = lt2 * PI / 180 | |
| delta_theta = (lt2 -lt1) * PI / 180 | |
| delta_fi = (ln2 - ln1) * PI / 180 |