Skip to content

Instantly share code, notes, and snippets.

View master_data_reconciliation_gt.sql
SELECT DISTINCT
ON (T . ID) T . ID,
ip. ID
FROM
bras_ip_pool T
INNER JOIN ip_vrf v1 ON (v1. ID = T .vrf_id)
INNER JOIN ip_vrfgroup vg1 ON (vg1. ID = v1.vrf_group_id)
INNER JOIN ip_prefix ip
LEFT OUTER JOIN ipannouncement ia on (ia.prefix_id=ip.id)
INNER JOIN ip_vrf v2 ON (v2. ID = ip.vrf_id)
View gist:ee0acec94291c9465409
import httplib2
from river_io_python.decorators.river_io_client import river_io_client
from river_io_python.urls import OBJECT_COUNT_WAITING_FOR_APPROVAL_URL, OBJECTS_WAITING_FOR_APPROVAL_URL, REGISTER_OBJECT_URL, PROCESSES_TRANSITION__URL, IS_USER_AUTHORIZED_URL
__author__ = 'ahmetdal'
class RiverIORestClient():
def __init__(self, base_url, auth_token):
View report_execution.py
from esefpy.web.rest.viewsets import BaseModelWithPaginationViewSet
from rest_framework import serializers
from rest_framework.reverse import reverse
from esefpy.reporting.models import ReportExecution, SUCCESS
from esefpy.reporting.serializers.report_execution import ReportExecutionSerializer
__author__ = 'ismail'
class ReportExecutionViewSet(BaseModelWithPaginationViewSet):
View cep-alert-mail.html
{% load divide timestamp_to_time %}
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>Lots of Logs, Alert Notification</title>
<style type="text/css">
@import url(http://fonts.googleapis.com/css?family=Lato:400);
View add.html
<div class="action-wizard" xmlns="http://www.w3.org/1999/html">
<div class="hero">
<div class="container">
<h3>{{ 'esefcontent_add_header'|translate: {model:modelName} }}</h3>
</div>
</div>
<div class="panel container">
<div class="panel-body">
<form name="actionForm" ng-submit="saveAction(true)">
View add.html
<div class="action-wizard" xmlns="http://www.w3.org/1999/html">
<div class="hero">
<div class="container">
<h3>{{ 'esefcontent_add_header'|translate: {model:modelName} }}</h3>
</div>
</div>
<div class="panel container">
<div class="panel-body">
<form name="actionForm" ng-submit="saveAction(true)">
View gist:1d09b4883173582f33ee
SELECT
[Maliyet Detayları].[CR Numarası],
[Maliyet Detayları].[Toplam Adam],
[Versiyon İçerikleri].[Ana Versiyon],
[Versiyon İçerikleri].[Versiyon Numarası],
[Uygulama Versiyonları].[Uygulama Adı],
[Maliyet Detayları].[İlgili Domain]
FROM [Uygulama Versiyonları]
INNER JOIN (
[Versiyon İçerikleri]
View getNeo4jQueryFunction.java
//maxRelationLevel is max relation level that you likely use. In your situation, this is 2. Cause, your levels are 1,2,null(ALL)
public String getQuery(String userId, List<String> userIds, Integer relationLevel, int maxRelationLevel) {
String startQuery = "start user1=node:node_auto_index(userId = %s), user2=node('name:(%s)')".format(userId, StringUtils.join(userIds,","));
String whereQuery = ""
List<String> whereQueryList = new ArrayList<String>();
if (null != relationLevel) {
for (i = 1; i <= relationLevel,i++){
whereQueryList.add("(user1-[knows*%s]->(user2) AND user2.preferedLevel>=%s)".format(i, i);
}
@javrasya
javrasya / get_latest_git_tag_by_pattern.bash
Created Jan 20, 2017
Get latest git tag by a version pattern
View get_latest_git_tag_by_pattern.bash
echo "$(git tag --sort=committerdate | grep -o 'v[0-9]*\.[0-9]*\.[0-9]*' | tail -n1)"