Skip to content

Instantly share code, notes, and snippets.

View setap's full-sized avatar

s.pyriaev setap

View GitHub Profile
@setap
setap / build.xml
Last active January 5, 2017 12:58
build ios app
<?xml version="1.0" encoding="utf-8"?>
<project name="FriendMobile" default="repository" basedir=".">
<property name="workdir" value="${teamcity.build.workingDir}" />
<property name="project.name" value="FriendMobile"/>
<property name="project.bundle.identifier" value="ru.sberbank.friendmobile"/>
<property name="env" value="${teamcity.buildConfName}"/>
<property name="ftp.server" value=""/>
<property name="ftp.port" value="21"/>
<property name="ftp.user" value=""/>
@setap
setap / TestflihtappDeployTeamcity.sh
Created May 26, 2016 10:58 — forked from JohannesRudolph/TestflihtappDeployTeamcity.sh
Builds and deploys an App to testflightapp.com. Integrates with Teamcity.
#!/bin/bash
#
# testflightapp.com tokens
API_TOKEN="YOUR_API_TOKEN"
TEAM_TOKEN="YOUR_TEAM_TOKEN"
PRODUCT_NAME="RowMotion"
ARTEFACTS="$PWD/Artefacts"
@setap
setap / recurse.sql
Created March 4, 2015 14:30
Oracle recusion select example
SELECT count(incident_id) as NUM,
lvl2 as LVL2,
atc_dept_name as DEPT
FROM
(SELECT t1.incident_id,
t2.contact_name,
t2.dept_name,
SUBSTR(t3.Path, 27, 24) AS lvl2 ,
t3.Path,
t4.atc_dept_name
@setap
setap / muliset.sql
Last active August 29, 2015 14:16
Oracle cast multiset and refcursor examples
CREATE OR REPLACE TYPE ProtocolType AS OBJECT ("ID" VARCHAR2(100),
"Comment" CLOB, "CHECKIN" VARCHAR2(255))
CREATE OR REPLACE TYPE ProtocolTableType AS TABLE OF ProtocolType
CREATE OR REPLACE VIEW ProtocolView AS
SELECT CAST(MULTISET
(SELECT t."ID", t."COMMENTS", t.atc_portal_checkin
FROM HPCPROTOCOLM1 t) AS ProtocolTableType) ppdd
FROM dual
SELECT VALUE(p)
FROM TABLE
@setap
setap / iterate.js
Created January 30, 2015 13:55
Загрузка подразделений.
function iterate() {
var dept = new SCFile("dept");
var ret = dept.doSelect("true");
while (ret == RC_SUCCESS) {
R(dept);
ret = dept.getNext();
}
}
Public Function RgxDfx(astring As Range) As String
Dim re As RegExp
Dim tempString
Set re = New RegExp
re.Pattern = "\d+"
re.Global = True
re.IgnoreCase = True
Set objMatches = re.Execute(astring)
RgxDfx = objMatches.Item(0).Value
End Function
var genericPool = require('generic-pool');
// This is the 'nearinfinity' driver: `npm install oracle`
var oracle = require('oracle');
conf = {
"hostName": "localhost",
"port": 1521,
"user": "oracle",
"password": "oracle",
"database": "xe",
}
##
## SC-SM SSL Certificates Creator (client component)
##
## This batch file facilitates the creation of the SSL certificates that are needed to setup SSL encryption for Service Manager 7.0x.
##
## Run this batch file with the fully-qualified domain name of the client machine as the first argument (%1), from the command line :
##
## \prompt>tso_cln_svlt <fully-qualified domain name>
##
## Rerun this batch file for each client machine to create a unique
#!/bin/bash
export JAVA_HOME="/usr/java/jdk1.7.0_45/jre"
export KEYTOOL=$JAVA_HOME/bin/keytool
# Password settings
#
# These are the default password settings used by the openssl and
# keytool programs. All passwords can be changed, EXCEPT the
# CACERT_PASSWD, as this is the default password that the SUN cacert
# from the JRE uses!
#
@setap
setap / gist:9831487
Created March 28, 2014 12:22
HP Service Manager. How to unlock a record
function unlock(resource)
{
var rteReturnValue = new SCDatum();
var rteNames = new SCDatum();
rteNames.push("name");
var rteValues = new SCDatum();
rteValues.setType(8);
rteValues=system.functions.insert(rteValues, 0, 1, resource);