Skip to content

Instantly share code, notes, and snippets.

View maksim77's full-sized avatar
:octocat:

Maksim Syomochkin maksim77

:octocat:
View GitHub Profile
@maksim77
maksim77 / script.js
Last active December 30, 2022 18:19
Generate obsidian daily events
var start = new Date();
start.setHours(0,0,0,0);
var end = new Date();
end.setHours(23,59,59,999);
let d = new Draft();
d.insert("## Events " + start.toLocaleDateString(), 0);
let cals = Calendar.getAllCalendars();
@tanaikech
tanaikech / submit.md
Last active February 25, 2022 06:00
spreadsheets.values.batchUpdate using Golang

spreadsheets.values.batchUpdate using Golang

Flow :

In my sample script, the script was made using the Quickstart. The flow to use this sample script is as follows.

  1. For Go Quickstart, please do Step 1 and Step 2.
  2. Please put client_secret.json to the same directory with my sample script.
  3. Copy and paste my sample script, and create it as new script file.
  4. Run the script.
  5. When Go to the following link in your browser then type the authorization code: is shown on your terminal, please copy the URL and paste to your browser. And then, please authorize and get code.
  6. Put the code to the terminal.
@martinhynar
martinhynar / zookeeper.service
Created June 2, 2017 10:56
ZooKeeper SystemD Service Unit File
[Unit]
Description=ZooKeeper Service
Documentation=http://zookeeper.apache.org
Requires=network.target
After=network.target
[Service]
Type=forking
User=zookeeper
Group=zookeeper

Kafka installation with systemd

0. Create kafka user

sudo adduser kafka
sudo adduser kafka sudo
su -l kafka

1. Download and Install kafka archive

@jarek-przygodzki
jarek-przygodzki / PostgreSQL.groovy
Created February 9, 2013 20:12
Howto connect to PostgreSQL DB in Groovy
import groovy.sql.Sql
def dbUrl = "jdbc:postgresql://localhost/test-db"
def dbUser = "test"
def dbPassword = "test"
def dbDriver = "org.postgresql.Driver"
def sql = Sql.newInstance(dbUrl, dbUser, dbPassword, dbDriver)