Skip to content

Instantly share code, notes, and snippets.

View nfort's full-sized avatar
:octocat:

Kirill Malyakin nfort

:octocat:
View GitHub Profile
@nfort
nfort / gist:318fb5d1a531ba855c42
Created November 30, 2014 13:39
Extracting information from a log file
<?
$text = "W/dalvikvm( 1553): threadid=1: uncaught exception
E/( 1553): FATAL EXCEPTION: main
E/( 1553): java.lang.StringIndexOutOfBoundsExceptio
E/( 1553): at widget.List.makeView(ListView.java:127)
E/( 1553): at widget.List.fillDown(ListView.java:622)
E/( 1553): at widget.List.fillFrom(ListView.java:709)";
$pattern = "/([a-z]+\w+).(\w+\.\w+):(\d{3,})./";
@nfort
nfort / php
Created December 17, 2015 07:02
Moscow metro
<?
$metro_list = ["94" => ["metro_id" => 94, "metro_name" => "Авиамоторная"],
"130" => ["metro_id" => 130, "metro_name" => "Автозаводская"],
"182" => ["metro_id" => 182, "metro_name" => "Академическая"],
"325" => ["metro_id" => 325, "metro_name" => "Александровский сад"],
"65" => ["metro_id" => 65, "metro_name" => "Алексеевская"],
"138" => ["metro_id" => 138, "metro_name" => "Алма-Атинская"],
"50" => ["metro_id" => 50, "metro_name" => "Алтуфьево"],
"159" => ["metro_id" => 159, "metro_name" => "Аннино"],
"322" => ["metro_id" => 322, "metro_name" => "Арбатская(c)"],
2. Компонент Textarea
3. Компонент ProgressBar
4. Компонент Icon
5. Компонент Divider
6. Компонент Popup
7. Fix багов в FF
8. Компонент Map
9. Подключить normalize
10. Контейнер delivery (вывод карты)
11. Смотрел верстку в браузерах
@nfort
nfort / getIPLocalServer
Last active April 4, 2024 18:28
Node.js get local ip server
var os = require('os');
var ip = '0.0.0.0';
var ips = os.networkInterfaces();
Object
.keys(ips)
.forEach(function(_interface) {
ips[_interface]
.forEach(function(_dev) {
if (_dev.family === 'IPv4' && !_dev.internal) ip = _dev.address
})