Skip to content

Instantly share code, notes, and snippets.

db.getCollection('seloger_programmes_22').find({year_week: 22.0}).forEach( function(row) {
var intList = ['year', 'year_week', 'year_day', 'year_month', 'propertyTypeId', 'price',
'levelGBB', 'professionalId', 'progressStatusId', 'tiersId', 'regionId', 'countryId', 'program_id']
intList.forEach(field => row[field] = NumberInt(row[field]))
row.realestateInvestmentType = row.realestateInvestmentType.map(v=>NumberInt(v))
delete row._id;
db.getCollection('seloger_programmes').insert(row);
});
@ddkino
ddkino / vs code debug golang
Last active May 29, 2019 23:07
vs code debug golang
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "Launch",
"type": "go",
"request": "launch",
@ddkino
ddkino / schema.graphql
Last active March 26, 2019 15:02
schema.graphql
type Filter {
dateMax: String
dateMin: String
first: Int
}
type Geojson {
type: String
coordinates: [Float!]!
@ddkino
ddkino / react-typescript.md
Created March 10, 2019 20:45 — forked from juhaelee/react-typescript.md
React + Typescript Cheatsheet

React + Typescript Cheatsheet

Setup

If you use atom... download & install the following packages:

What are Typescript type definition files? (*.d.ts)

{
"[go]": {
"editor.codeActionsOnSave": {
"source.organizeImports": true
},
"editor.formatOnSave": true
},
"[html]": {
"editor.defaultFormatter": "vscode.html-language-features"
},
{
"[go]": {
"editor.codeActionsOnSave": {
"source.organizeImports": true
},
"editor.formatOnSave": true
},
"[html]": {
"editor.defaultFormatter": "vscode.html-language-features"
},
@ddkino
ddkino / kubernetes.sh
Created March 9, 2019 22:13 — forked from benbonnet/kubernetes.sh
kubernetes on Ubuntu 18.10
# Source : https://mherman.org/blog/setting-up-a-kubernetes-cluster-on-ubuntu/
# on all nodes
sudo apt-get update && sudo apt-get install -y apt-transport-https
curl -s https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu bionic stable"
sudo apt update && sudo apt install -qy docker-ce
curl -s https://packages.cloud.google.com/apt/doc/apt-key.gpg | sudo apt-key add -
echo "deb http://apt.kubernetes.io/ kubernetes-xenial main" > /etc/apt/sources.list.d/kubernetes.list
sudo apt-get update && sudo apt-get install -y kubeadm kubelet kubectl
@ddkino
ddkino / mobprobe usb
Created December 3, 2018 20:08
mobprobe usb
# disconnect all devices
sudo su
modprobe -r usbhid && sleep 5 && sudo modprobe usbhid
modprobe -r usb-storage
modprobe usb-storage
sudo apt install apt-transport-https ca-certificates curl software-properties-common
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
sudo apt-key fingerprint 0EBFCD88
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu bionic stable"
sudo apt update
sudo apt install docker-ce