Skip to content

Instantly share code, notes, and snippets.

@xx4159
xx4159 / main.scss
Last active Aug 29, 2015
Micro Clearfix - Scss 플레이스홀더(Placeholder)
View main.scss
//micro-clearfix.scss 모듈 호출
@import "micro-clearfix";
#page {
nav ul.navi, .article{
@extend %clearfix;
}
}
@xx4159
xx4159 / mosql-wiki.md
Created Nov 28, 2016
Migrate Mongodb to PostgreSQL
View mosql-wiki.md

Migrate Mongodb to PostgreSQL

목적

  • 사용자의 로컬 테스트를 목적으로 쓰여진 내용입니다.
  • mac osx에서 진행했으며, ubuntu 나 centos같은 다른 리눅스 버전에서는 다를 수 있음!
  • This is FOR OSX
  • I hope we collaborate.

Prerequire

  • postgreSQL install.
  • mongodb가 replica setting.
View semver-wiki.md

Semver

  • Semantic Versioning
  • [Major].[Minor].[Patch]
    • major: incompatible change
    • minor: add functionality, backwards-compatible
    • patch: bug fixes. backwards-compatible

tilde

  • ~
@xx4159
xx4159 / uri.js
Created May 2, 2019 — forked from jlong/uri.js
URI Parsing with Javascript
View uri.js
var parser = document.createElement('a');
parser.href = "http://example.com:3000/pathname/?search=test#hash";
parser.protocol; // => "http:"
parser.hostname; // => "example.com"
parser.port; // => "3000"
parser.pathname; // => "/pathname/"
parser.search; // => "?search=test"
parser.hash; // => "#hash"
parser.host; // => "example.com:3000"
@xx4159
xx4159 / replace-curly.pipe.ts
Last active Jul 3, 2019
Replace curly braces to span
View replace-curly.pipe.ts
import { Pipe, PipeTransform } from '@angular/core';
@Pipe({
name: 'replaceCurly'
})
export class ReplaceCurlyPipe implements PipeTransform {
transform(value: string): string {
const regex = /\{\{([^\{].*?)\}\}/g;
if (value) {
return value.replace(regex, `<span>$1</span>`);
View intersection-observer.service.ts
import { Injectable } from '@angular/core';
import 'intersection-observer';
declare global {
interface Window {
IntersectionObserver: IntersectionObserver;
}
}
const defaults = {
@xx4159
xx4159 / version.sh
Created Jan 10, 2020 — forked from DarrenN/get-npm-package-version
Extract version from package.json (NPM) using bash / shell
View version.sh
# Version key/value should be on his own line
PACKAGE_VERSION=$(cat package.json \
| grep version \
| head -1 \
| awk -F: '{ print $2 }' \
| sed 's/[",]//g')
echo $PACKAGE_VERSION
View I'm a night 🦉
🌞 Morning 13 commits █▋░░░░░░░░░░░░░░░░░░░ 7.9%
🌆 Daytime 65 commits ████████▎░░░░░░░░░░░░ 39.6%
🌃 Evening 56 commits ███████▏░░░░░░░░░░░░░ 34.1%
🌙 Night 30 commits ███▊░░░░░░░░░░░░░░░░░ 18.3%
You can’t perform that action at this time.