Skip to content

Instantly share code, notes, and snippets.

View YoungjaeKim's full-sized avatar

YoungjaeKim YoungjaeKim

View GitHub Profile
@YoungjaeKim
YoungjaeKim / download-latest-jenkins-artifact.py
Created August 7, 2018 14:05 — forked from vishwasjois/download-latest-jenkins-artifact.py
Download the latest successful build artifacts from Jenkins using Python 3
#!/usr/bin/env python3
# Download the latest successful build artifacts from Jenkins using Python 3
# John McGehee 1/25/2016
#
# Based on the Python 2 version by supertom: https://gist.github.com/supertom/2759847
import argparse
import codecs
import io
import json
@YoungjaeKim
YoungjaeKim / launch.json
Created February 18, 2018 12:19
VSCode launch.js configuration for electron
{
"version": "0.2.0",
"configurations": [
{
"name": "Launch",
"type": "node",
"request": "launch",
"program": "${workspaceRoot}/starter.js --2nd",
"stopOnEntry": false,
"args": [],
@YoungjaeKim
YoungjaeKim / AzureSearch-SetReplicaCount.graphrunbook
Created June 16, 2017 06:18
Azure Search SetReplicaCount runbook
{"SchemaVersion":"1.9","RunbookDefinition":"AAEAAAD/////AQAAAAAAAAAMAgAAAFZPcmNoZXN0cmF0b3IuR3JhcGhSdW5ib29rLk1vZGVsLCBWZXJzaW9uPTcuMi4wLjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49bnVsbAUBAAAALE9yY2hlc3RyYXRvci5HcmFwaFJ1bmJvb2suTW9kZWwuR3JhcGhSdW5ib29rBQAAAApwYXJhbWV0ZXJzCmFjdGl2aXRpZXMFbGlua3MIY29tbWVudHMLb3V0cHV0VHlwZXMDAwMDA6YBU3lzdGVtLkNvbGxlY3Rpb25zLkdlbmVyaWMuTGlzdGAxW1tPcmNoZXN0cmF0b3IuR3JhcGhSdW5ib29rLk1vZGVsLlBhcmFtZXRlciwgT3JjaGVzdHJhdG9yLkdyYXBoUnVuYm9vay5Nb2RlbCwgVmVyc2lvbj03LjIuMC4wLCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPW51bGxdXaUBU3lzdGVtLkNvbGxlY3Rpb25zLkdlbmVyaWMuTGlzdGAxW1tPcmNoZXN0cmF0b3IuR3JhcGhSdW5ib29rLk1vZGVsLkFjdGl2aXR5LCBPcmNoZXN0cmF0b3IuR3JhcGhSdW5ib29rLk1vZGVsLCBWZXJzaW9uPTcuMi4wLjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49bnVsbF1doQFTeXN0ZW0uQ29sbGVjdGlvbnMuR2VuZXJpYy5MaXN0YDFbW09yY2hlc3RyYXRvci5HcmFwaFJ1bmJvb2suTW9kZWwuTGluaywgT3JjaGVzdHJhdG9yLkdyYXBoUnVuYm9vay5Nb2RlbCwgVmVyc2lvbj03LjIuMC4wLCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPW51bGxdXaQBU3lzdGVtLkNvbGxlY3Rpb25z
@YoungjaeKim
YoungjaeKim / ServiceDefinition.csdef
Last active August 29, 2015 14:13
A portion of ServiceDefinition.csdef file for .Net Framework installation during Azure Role startup
<Task commandLine="Startup\installnet35.cmd" executionContext="elevated" taskType="simple">
<Environment>
<Variable name="EMULATED">
<RoleInstanceValue xpath="/RoleEnvironment/Deployment/@emulated" />
</Variable>
</Environment>
</Task>
@YoungjaeKim
YoungjaeKim / installnet35.cmd
Last active August 29, 2015 14:13
.NET Framework 3.5 Installation cmdlet for Azure Roles
@echo off
reg query "HKLM\SOFTWARE\Microsoft\NET Framework Setup\NDP\v3.5" /V SP
IF "%ERRORLEVEL%" EQU "0" (
ECHO dotnet framework 3.5 is already installed >> "%TEMP%\StartupLog.txt" 2>&1
EXIT 0
) ELSE (
PowerShell -ExecutionPolicy Unrestricted "%~dp0..\..\Startup\installnet35.ps1" >> "%TEMP%\StartupLog.txt" 2>&1
)
@YoungjaeKim
YoungjaeKim / installnet35.ps1
Created January 10, 2015 19:01
.NET Framework 3.5 Installation script for Azure Roles
# original: http://anuchandy.blogspot.kr/2014/06/automating-net-35-installation-on-azure.html
# Method that returns path to the directory holding 'installnet35.ps1' script.
function Get-ScriptDirectory
{
$Invocation = (Get-Variable MyInvocation -Scope 1).Value
Split-Path $Invocation.MyCommand.Path
}
# Gets path to the local resource we reserved for manipulating the zip file.
[void]([System.Reflection.Assembly]::LoadWithPartialName("Microsoft.WindowsAzure.ServiceRuntime"))
@YoungjaeKim
YoungjaeKim / build_successful.ftl
Last active April 23, 2018 10:16
Teamcity Email Notification template to give direct download link of an artifact.
<#-- Uses FreeMarker template syntax, template guide can be found at http://freemarker.org/docs/dgui.html -->
<#import "common.ftl" as common>
<#import "responsibility.ftl" as resp>
<#global subject>[<@common.subjMarker/>, SUCCESSFUL] Build ${project.fullName} :: ${buildType.name} <@common.short_build_info build/></#global>
<#global body>Build ${project.fullName} :: ${buildType.name} <@common.short_build_info build/> successful ${var.buildShortStatusDescription}.
<@resp.buildTypeInvestigation buildType true/>
Agent: ${agentName}
@YoungjaeKim
YoungjaeKim / teamcity_azure_worker_role.ps1
Last active December 23, 2015 05:53 — forked from srkirkland/deploy.ps1
PowerShell script to deploy package to Azure Worker Role by using teamcity CI build server
#Modified and simplified version of https://www.windowsazure.com/en-us/develop/net/common-tasks/continuous-delivery/
#Modified and treat error-terminating of http://weblogs.asp.net/srkirkland/ci-deployment-of-azure-web-roles-using-teamcity
$ErrorActionPreference = "Stop"
$subscription = "[Your Subscription Name]"
$service = "[Your Azure Service Name]"
$slot = "staging" #staging or production
$package = "[ProjectName]\bin\[BuildConfigName]\app.publish\[ProjectName].cspkg"
$configuration = "[ProjectName]\bin\[BuildConfigName]\app.publish\ServiceConfiguration.Cloud.cscfg"
$timeStampFormat = "g"
$deploymentLabel = "ContinuousDeploy to $service v%build.number%"
@YoungjaeKim
YoungjaeKim / TelerikUserStore.cs
Last active August 29, 2015 14:05
ASP.NET UserStore for Telerik DataAccess
/// <summary>
/// UserStore for Telerik DataAccess.
/// </summary>
public class TelerikUserStore : IUserStore<AspNetUser, int>, IUserPasswordStore<AspNetUser, int>, IUserClaimStore<AspNetUser, int>,
IUserRoleStore<AspNetUser, int>, IUserSecurityStampStore<AspNetUser, int>, IUserLoginStore<AspNetUser, int>, IUserLockoutStore<AspNetUser, int>,
IUserEmailStore<AspNetUser, int>, IUserPhoneNumberStore<AspNetUser, int>, IUserTwoFactorStore<AspNetUser, int>
{
private bool _disposed;
public TelerikUserStore()
@YoungjaeKim
YoungjaeKim / GCMIntentService.java
Created September 27, 2013 08:19
푸쉬 서비스 처리.
// JSON 메시지 해석.
try {
if (jsonObject != null) {
resultIntent.putExtra("PushType", jsonObject.getString("type"));
if (jsonObject.getString("type").equalsIgnoreCase("Reply")) {
targetId = jsonObject.getString("questionId");
ticker = "새 답변이 달렸어요";
title = getString(R.string.pushReplyArrivedPrefix);
message = jsonObject.getString("text");
resultIntent.putExtra("questionId", targetId);