This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Access number | |
cat production.log | grep "^Processing" | wc | awk '{print $1}' | |
# Each IP access number | |
cat production.log | grep “^Processing” | awk ‘{print $4}’ | uniq -c | |
# Independent IP number | |
cat production.log | grep "^Processing" | awk '{print $4}' | uniq | wc | awk '{print $1}' | |
cat production.log | grep “^Processing” | awk ‘{print $4}’ | uniq | wc -l |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
WITH prepared AS ( | |
SELECT | |
issue_task_id, | |
MAX(stage_id) AS stage_id, | |
MAX(executor_id) AS executor_id, | |
MAX(day_id) day_id, | |
MAX(project_id) project_id, | |
MAX(area_id) area_id, | |
MAX(state_id) state_id, | |
MAX(location_id) location_id, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"swagger": "2.0", | |
"info": { | |
"version": "1.0.0", | |
"title": "Topcontrol", | |
"description": "Topcontrol" | |
}, | |
"tags": [ | |
{ | |
"name": "pet", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Aug 29, 2016 07:58:37 | |
Определение названия сети | |
Поиск подходящего алгоритма для сети MosMetro_Free | |
Версия приложения: 1.6.2-37 | |
Подключение к сети MosMetro_Free | |
Проверка доступа в интернет | |
java.net.UnknownHostException: Unable to resolve host "wi-fi.ru": No address associated with hostname | |
at java.net.InetAddress.lookupHostByName(InetAddress.java:427) | |
at java.net.InetAddress.getAllByNameImpl(InetAddress.java:252) | |
at java.net.InetAddress.getAllByName(InetAddress.java:215) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class ContextRunner | |
DANGER = EntityModel.create_access_model('danger') | |
DANGER_ENTITY = Entity.find_by(table_name: 'danger') | |
include FactoryGirl::Syntax::Methods | |
def initialize(opts={}) | |
opts.each do |var, value| | |
let(var) do | |
value | |
end | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/*********************************************************************** | |
* [email protected]; | |
***********************************************************************/ | |
/*********************************************************************** | |
* Interpolate a point along a line, useful for Geocoding applications | |
* SELECT line_interpolate_point( 'LINESTRING( 0 0, 2 2'::geometry, .5 ) | |
* returns POINT( 1 1 ). | |
* Works in 2d space only. | |
* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module Spatial::Utils | |
EARTH_RADIUS = 6371.0 | |
DETAILED_THRESHOLD = 3.0 # meters | |
module_function | |
def distance(point1, point2) | |
point1 = to_radians(point1) | |
point2 = to_radians(point2) | |
dlat = point2[0] - point1[0] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Create a new point array with no segment longer than the input segment length (expressed in radians!) | |
* @param pa_in - input point array pointer | |
* @param max_seg_length - maximum output segment length in radians | |
*/ | |
static POINTARRAY* | |
ptarray_segmentize_sphere(const POINTARRAY *pa_in, double max_seg_length) | |
{ | |
POINTARRAY *pa_out; | |
int hasz = ptarray_has_z(pa_in); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React, {Component} from 'react'; | |
import {isEqual, zip} from 'lodash'; | |
import {BootstrapTable, TableHeaderColumn} from 'react-bootstrap-table'; | |
const SORT_LIMIT = 2; | |
class Table extends Component { | |
state = { | |
sortName: [], |