Skip to content

Instantly share code, notes, and snippets.

View dongjinahn's full-sized avatar
💭
⛄️

Dong-jin Ahn dongjinahn

💭
⛄️
View GitHub Profile
constructor(public formBuilder: FormBuilder) {
this.form = this.formBuilder.group({
a: null,
b: 1,
c: [2, null],
d: [2, someAsyncValidator],
e: [],
f: [[]],
});
}
@dongjinahn
dongjinahn / build.sh
Last active November 27, 2018 02:01
llvm
./llvm/utils/docker/build_docker_image.sh \
-s debian8 -d clang-debian8 -t "stable" \
--branch branches/google/stable \
-p clang -i install-clang -i install-clang-headers \
-- \
-DCMAKE_BUILD_TYPE=Debug
[Desktop Entry]
Version=13.0
Type=Application
Terminal=false
Icon=/home/olaf/dev/1-password-linux-x64/1password.png
Name=1Password
Exec=/home/olaf/dev/1-password-linux-x64/1-password
SELECT
PERCENTILE_CONT(0.25) WITHIN GROUP (ORDER BY something) OVER () as first_quarter,
PERCENTILE_CONT(0.5) WITHIN GROUP (ORDER BY something) OVER () as median,
PERCENTILE_CONT(0.75) WITHIN GROUP (ORDER BY something) OVER () as third_quarter
FROM some_table
LIMIT 1;
@dongjinahn
dongjinahn / index.js
Last active August 15, 2018 10:20
whooing deletion
const axios = require('axios');
const delay = require('delay');
async function getSections() {
const res = await axios({
method: 'get',
url: 'https://whooing.com/api/sections.json',
headers: {
'X-API-KEY': `app_id=1234,token=1234,signiture=1234,nounce=asdf,timestamp=${Date.now()}`,
},
$ docker swarm init --advertise-addr 192.168.0.55
Swarm initialized: current node (bvz81updecsj6wjz393c09vti) is now a manager.
To add a worker to this swarm, run the following command:
docker swarm join \
--token TOKEN IP_ADDRESS:PORT
To add a manager to this swarm, run 'docker swarm join-token manager' and follow the instructions.
@NgModule({
declarations: [
MyApp,
],
imports: [
...
NgReduxModule,
StoreModule, // <============================== HERE!
...
],
const path = require('path');
const webpack = require('webpack'); // eslint-disable-line
const outputPath = path.resolve(__dirname, 'dll');
module.exports = {
entry: {
polyfill: [
'babel-polyfill',
],
if ('addEventListener' in document) {
document.addEventListener('DOMContentLoaded', function() {
FastClick.attach(document.body);
}, false);
}
import { shallow } from '@vue/test-utils';
import List from '../src/components/List.vue';
describe('List.vue', () => {
it('renders li for each item in props.items', () => {
const items = ['', ''];
const wrapper = shallow(List, {
propsData: { items },
});
expect(wrapper.findAll('li')).toHaveLength(items.length);