Skip to content

Instantly share code, notes, and snippets.

View YoungjaeKim's full-sized avatar

YoungjaeKim YoungjaeKim

View GitHub Profile
@YoungjaeKim
YoungjaeKim / Avatar.java
Created August 31, 2013 17:15
아바타 모델
package bigcamp.yok.student.model;
/**
* 아바타 클래스
* Created by Youngjae on 13. 8. 31.
*/
public class Avatar {
public String head;
public String headfront;
public String headback;
@YoungjaeKim
YoungjaeKim / avatar include
Created August 31, 2013 17:17
아바타 삽입 예
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:dividerPadding="10dp"
android:layout_alignParentTop="true"
android:layout_toLeftOf="@+id/imageButtonSubmitYok"
android:layout_marginTop="20dp">
<include
@YoungjaeKim
YoungjaeKim / avatar_layout_example.xml
Created August 31, 2013 17:18
아바타 사용 예시 레이아웃
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:dividerPadding="10dp"
android:layout_alignParentTop="true"
android:layout_toLeftOf="@+id/imageButtonSubmitYok"
android:layout_marginTop="20dp">
<include
@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);
@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 / 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 / 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 / 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 / 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 / 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>