This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function writeDocs() { | |
// new line | |
changedDocs = []; | |
// end of new line | |
if (currentBatch.docs.length === 0) { | |
return; | |
} | |
var docs = currentBatch.docs; | |
return target.bulkDocs({docs: docs, new_edits: false}).then(function (res) { | |
if (returnValue.cancelled) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;;; centered-window-mode.el --- Center the text when there's only one window | |
;; | |
;; Copyright (C) 2014 Anler Hp <http://anler.me> | |
;; | |
;; Author: Anler Hp <http://anler.me>, Mickael Kerjean <mickael.kerjean@gmail.com> | |
;; Version: 0.0.2 | |
;; Keywords: faces, windows | |
;; URL: https://github.com/ikame/centered-window-mode | |
;; Compatibility: GNU Emacs 23.x, GNU Emacs 24.x | |
;; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;;; puml-mode.el --- Major mode for PlantUML -*- lexical-binding: t; -*- | |
;; Filename: puml-mode.el | |
;; Description: Major mode for PlantUML diagrams sources | |
;; Compatibility: Tested with Emacs 24.3 through 24.5 on OS X 10.10 | |
;; Author: Zhang Weize (zwz) | |
;; Maintainer: Carlo Sciolla (skuro) | |
;; Keywords: uml plantuml ascii | |
;; Version: 0.6.2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;; https://github.com/dholm/benchmark-init-el | |
;; (add-to-list 'load-path "~/.emacs.d/lisp/plugins/benchmark-init") | |
;; (require 'benchmark-init-loaddefs) | |
;; (benchmark-init/activate) | |
;; ------------------------------------------------------------------------------------- | |
;; --------------------- SHORTCUTS ----------------------------------------- | |
;; ------------------------------------------------------------------------------------- | |
;; LISP |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const serialize = function($form){ | |
if(!$form) return {}; | |
var obj = {}; | |
var elements = $form.querySelectorAll( "input, select, textarea" ); | |
for( var i = 0; i < elements.length; ++i ) { | |
var element = elements[i]; | |
var name = element.name; | |
var value = element.value; | |
if(name){ | |
obj[name] = value; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
set -e | |
# run like this: | |
# /bin/bash -c "$(curl -fsSL https://xxx)" | |
VERSION=1.27 | |
######################## | |
# docker stuff: https://kubernetes.io/docs/setup/production-environment/container-runtimes/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
kind: DaemonSet | |
apiVersion: apps/v1 | |
metadata: | |
name: traefik-ingress-controller | |
namespace: kube-system | |
labels: | |
k8s-app: traefik-ingress-lb | |
spec: | |
selector: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function addLinkToHead(url) { | |
let $link = document.createElement("link") | |
$link.setAttribute("rel", "stylesheet") | |
$link.setAttribute("href", url) | |
document.head.appendChild($link) | |
} | |
function addScriptToHead(url) { | |
let $script = document.createElement("script") | |
$script.setAttribute("src", url) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// go mod init example.com && go get . | |
// CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o webdav.bin main.go | |
package main | |
import ( | |
"fmt" | |
"github.com/google/go-webdav" | |
"github.com/google/go-webdav/memfs" | |
"net/http" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Build steps: | |
* 1. go generate -x ./index.go | |
* 2. go build -o sftp.bin index.go | |
*/ | |
package main | |
import ( | |
_ "embed" | |
"fmt" |
OlderNewer