Skip to content

Instantly share code, notes, and snippets.

View nimdraugsael's full-sized avatar

Aleksei Shaikhaleev nimdraugsael

  • Phuket, Thailand
View GitHub Profile
{
"districts": {
"1665105": {
"id": 1665105,
"name": "Orchard"
}
},
"filtered_hotels": 1,
"filters": {
"counters": {
id | affiliate_id | before | after | delta
---------+--------------+----------+----------+---------
5075833 | 4224 | 31802.48 | 35883.37 | 4080.89
5631489 | 4224 | -489.70 | 582.17 | 1071.87
5156240 | 18705 | 6377.83 | 7138.63 | 760.80
5078845 | 42469 | 6284.35 | 6890.63 | 606.28
5057899 | 4224 | 7537.16 | 8083.51 | 546.35
5102293 | 13429 | 3850.33 | 4382.66 | 532.33
5075199 | 5107 | 5453.62 | 5967.49 | 513.87
5096046 | 18705 | 3434.89 | 3909.79 | 474.90
require 'base64'
// Decoding
cookie_value = 'CjpqE0+NhreIpEqgAyz3Ag=='
uid_hex_string = "uscc=" + Base64.decode64(cookie_value).unpack("VVVV").map{|x|x.to_s(16).rjust(8, '0')}.join.upcase
// Encoding with ruby > 1.9.2
uscc = "136A3A0AB7868D4FA04AA48802F72C03"
cookie_value = Base64.safe_encode64(uscc.scan(/.{8}/).map{|x| x.to_i(16)}.pack("VVVV"))
var plane_symbol = {
path: 'M 10.942,0 C 10.627,0 10.362,0.115 10.141,0.347 9.926,0.575 9.816,0.846 9.816,1.152 V 7.945 L 0,13.94 v 2.358 l 9.819,-3.11 v 5.127 L 7.63,20.393 V 22 L 11.001,21.022 14.31,22 V 20.392 L 12.189,18.316 V 13.188 L 22,16.296 V 13.938 L 12.188,7.946 V 1.152 C 12.188,0.845 12.063,0.574 11.832,0.346 11.594,0.115 11.314,0 11.001,0 h -0.059 z',
fillColor: "blue",
fillOpacity: 0.05,
strokeOpacity: 0.3,
scale: 1,
anchor: new google.maps.Point(11, 3)
};
var flightPath = new google.maps.Polyline({
angular.module('Map').service 'MapGeometry', ['Underscore', (_) ->
get: (point_a, point_b) ->
delta_x = point_b[0] - point_a[0]
delta_y = point_b[1] - point_a[1]
cos_alpha = delta_x / Math.sqrt(delta_x*delta_x + delta_y*delta_y)
Math.acos(cos_alpha) * ((delta_y > 0) ? 1 : -1 )
]
let(:depart_date){Date.today}
let(:return_date){Date.today + 5.days}
let(:marker){'12321'}
it 'should redirect to city page if file_name found' do
post :create,
marker: 'direct',
depart_date: depart_date.to_s,
return_date: return_date.to_s,
destination: @mow.iata,

Workflow, описанный в данном документе в явном виде используется на данный момент в проектах jetradar и ifeiso, геме cms_engine, частично в nano_api. Так же возможно использование приёмов, описанных в документе, в других workflow.

Trivia

Описываемый workflow в общем случае выглядит следующим образом:

  1. Актуализируем локальный master.
  2. Создаём feature ветку от мастера.
  3. Делаем необходимые изменения и коммиты.
  4. Содержим ветку актуальной относительно master при помощи rebase.
$ ->
$module_type_select = $('@module_type_select')
$module_type_select.trigger 'change'
$module_type_select.on 'change', ->
$flight_fields = $('.wf-info__depart, .wf-info__return')
$show_hotels_checkbox = $('@show_hotels_checkbox')
if this.value == 'hotel'
$flight_fields.hide()
$show_hotels_checkbox.prop('checked', true)
else
<?php
/*
Plugin Name: Bezdelniki.org ajax filter
Plugin URI: http://vk.com/nimdraug
Description: a plugin to get posts through ajax request
Version: 0.1
Author: Aleksei Shaikhaleev
Author URI: http://vk.com/nimdraug
License: GPL2
*/
<p>&nbsp;</p>
<ul><h2>Early Childhood Education (VYL programmes)</h2>
<li><a href="/teaching/vyl_1a">Introduction to VYL at BKC</a></li>
<li><a href="/teaching/vyl_1b">Classes and courses offered</a></li>
<li><a href="vyl_1c.html">Support and training provided</a></li>
<li><a href="/teaching/vyl_1d">Resources available</a></li>
<li><a href="/teaching/vyl_1e">Standard lesson format (45m and at Playgroups)</a></li>
<li><a href="/teaching/vyl_1f">Teacher feedback (2008-2009)</a></li>