Skip to content

Instantly share code, notes, and snippets.

View imskojs's full-sized avatar
🎯
Focusing

Seunghoon Ko imskojs

🎯
Focusing
  • Seoul, Korea
View GitHub Profile
@imskojs
imskojs / GitHub_Stuff.js
Last active September 11, 2016 20:19
GitHub_Stuff
// update .gitignore
// Making changes to .gitignore and make ignored files available locally
//change .gitignore and add commit everything before doing this
git rm -r --cached some-directory
git commit -m 'Remove the now ignored directory "some-directory"'
git push origin master
// After this, back to normal workflow. Note ignored files are available locally.
git add .
git commit -m 'blar'
git push origin master
@imskojs
imskojs / Sublime_Text_Development.js
Last active April 5, 2016 08:11
Sublime_Text_Development
// open from terminal
ln -s /Applications/Sublime\ Text.app/Contents/SharedSupport/bin/subl /usr/local/bin/subl
// Korean can't be typed in Sublime
Happens when Preference is Edited. Restart Sublime
//Sidebar Setting
[
{
"class": "sidebar_label",
@imskojs
imskojs / Android_Development.js
Last active April 7, 2016 01:55
Android_Development
// "MissingTranslation" Error
// in platforms/android/build.gradle find `android{...}` and add `lintOptions{abortOnError false}` like below;
android {
lintOptions {
abortOnError false
}
}
// or Alternatively
android {
lintOptions {
@imskojs
imskojs / Ionic_Development.js
Last active July 19, 2016 17:57
Ionic_Development
// cordova-screenshot not calling callback function.
ionic platform remove android
ionic platform add android@4.1.1
ionic plugin add com.darktalker.cordova.screenshot@v0.1.4 #instead of master downgrade by one.
// Solve Jumping behaviour on focus input
cordova.plugins.Keyboard.disableScroll(true);
ion-content[overflow-scroll="false"]
@imskojs
imskojs / Sever_Development.js
Last active March 17, 2016 07:58
Server_Development
// sails Objects immutable or mutable?
// mutable only when populate is NOT called
// immutable when populate is called.
// Downgrade node to 0.12.x
// Ubuntu
curl -sL https://deb.nodesource.com/setup_0.12 | sudo bash -
sudo apt-get install -y nodejs
@imskojs
imskojs / IOS_Development.js
Last active May 2, 2016 09:12
IOS_Development.js
// FIRST TIME BUILD AND Upload
config.xml.version = VERSION;
gulp;
ionic build ios
Xcode.General.Team['Add an account...'].doSettup()
doConnectDevice().then(Xcode.General.fix_issues).then(Xcode.General.Devices = 'iPhone').doXcodeRun()
doItunesConnectLogin({clientId,password}).then(createAccountWithBundleId === config.xml.widget.id)
Xcode.Product.clean().build().archive()
Xcode.Window.Organizer.YOUR_APP.UploadToAppStore
@imskojs
imskojs / Minifying_Ionic_app.js
Created March 18, 2016 11:43
Minifying Ionic app
/* jshint ignore:start */
var Promise = require('bluebird');
/* jshint ignore:end */
var purify = require('purify-css');
var glob = require('glob');
var uglify = require('uglify-js');
var fs = require('fs');
var sh = require('shelljs');
var del = require('del');
@imskojs
imskojs / st3-ng2-html-highlighting.md
Created September 25, 2016 10:38 — forked from zvuc/st3-ng2-html-highlighting.md
Proper Syntax Highlighting for Angular2 HTML in Sublime Text 3

Fix ng2 attributes not being highlighted like other HTML attributes correctly

  1. Find Sublime Text 3.app in Applications, View Package Contents
  2. Open Contents/MacOS/Packages/HTML.sublime-package (Rename to .zip, unpackage it)
  3. In HTML.sublime-syntax file, add following under tag-event-attribute:
tag-ng-attribute:
  - match: '\s+(([\[\(][a-zA-Z0-9.:-]+[\]\)]|(\[\()[a-zA-Z0-9.:-]+(\)\])|[\*#][a-zA-Z0-9.:-]+)\s*(=)\s*)'
    captures:
      1: meta.attribute-with-value.html
@imskojs
imskojs / gist:3362cb79d8be5011e3b057b850baf54b
Last active July 16, 2017 05:05
Angular: get generic parent component
import { Component, Injector, ViewContainerRef } from '@angular/core';
// Injector.view is hidden property. Hence no typing for this.
// Below extends abstract injector class.
// Note: Class can't be merged so we create interface
// which extends Injector class.
interface ExtendedInjector extends Injector {
view: { component: any }
}
@Component()
class ChildComponent {
@imskojs
imskojs / typecasting.ts
Created July 18, 2017 04:01
type casting from superclass to subclass
class x {
constructor(private navCtrl: NavController) {
}
ngAfterViewInit(){
const tab: Tab = this.navCtrl as any;
}
}