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 / p2pool
Created January 12, 2018 13:26 — forked from jimeh/p2pool
Quickly hacked together init.d script for p2pool.
#!/bin/sh
### BEGIN INIT INFO
# Provides: p2pool
# Required-Start: $network
# Required-Stop: $network
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: p2pool startup script
# Description: p2pool startup script
### END INIT INFO
@imskojs
imskojs / UbuntuMiner
Created November 2, 2017 09:51 — forked from zcshiner/UbuntuMiner
UbuntuMiner. Command list to build an Ubuntu 14.04 Server with Cuda Toolkit 6.5, driver 352.41, and ccminer.
#!/bin/bash
### Command log to install Cuda Toolkit 6.5, driver 343.22, and ccminer.
## Update the system
sudo apt-get update && sudo apt-get -y dist-upgrade
# All the dependencies for Cuda & ccminer (I think)
sudo apt-get -y install gcc g++ build-essential automake linux-headers-$(uname -r) git gawk libcurl4-openssl-dev libjansson-dev xorg libc++-dev libgmp-dev python-dev
@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;
}
}
@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 / 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 / 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 / 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 / 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 / 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 / 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 {