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 | |
# <UDF name="SSL_CERTIFICATE" label="CLOUDFLARE_SSL_CERTIFICATE" example="public key" default=""> | |
# <UDF name="SSL_CERTIFICATE_KEY" label="CLOUDFLARE_SSL_CERTIFICATE_KEY" example="private key" default=""> | |
# stop the script if any error occurs | |
set -o errexit | |
set -o nounset | |
# don't ask yes/no questions, just continue | |
export DEBIAN_FRONTEND=noninteractive |
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
# wget https://dlcdn.apache.org//jmeter/binaries/apache-jmeter-5.5.zip | |
# unzip apache-jmeter-5.5.zip | |
# ruby load_testing_for_uploading.rb | |
# results(takes some time to generate html output): apache-jmeter-5.5/bin/jmeter -g ./results.jtl -o ./results | |
# npx http-server results | |
require 'ruby-jmeter' | |
require 'uri' |
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 { Client } = require("@notionhq/client"); | |
const notionNewsDatabaseId = process.env.NOTION_NEWS_DATABASE_ID; | |
const allNews = await notion.databases.query({ | |
database_id: notionNewsDatabaseId, | |
}); | |
let fetchedNews = []; |
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
// Requires HASURA_URI and HASURA_TOKEN to be set in configuration. | |
function (user, context, callback) { | |
const userId = user.user_id; | |
const email = user.email; | |
const userProfileName = user.name || email.split('@')[0].slice(0,5); // if name is not there, use first characters of the email username | |
const userProfilePictureUrl = user.picture; | |
const url = configuration.HASURA_URI; | |
const upsertUserQuery = ` | |
mutation($userId: String!, $email: String, $userProfileName: String, $userProfilePictureUrl: String, $createdAt: timestamp, $updatedAt: timestamp){ |
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
# Use f.input :start_date, as: :date_picker | |
class DatePickerInput < SimpleForm::Inputs::Base | |
def input(wrapper_options = nil) | |
input_html_classes.delete(:date_picker) | |
input_html_classes << :string | |
input_html_classes << 'datepicker' | |
merged_input_options = merge_wrapper_options(input_html_options, wrapper_options) | |
text_field = @builder.text_field(attribute_name, merged_input_options) |
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
#!/usr/bin/env xdg-open | |
[Desktop Entry] | |
Version=1.0 | |
Type=Application | |
Terminal=false | |
StartupNotify=true | |
Name=Smartgit | |
Exec=env SMARTGIT_JAVA_HOME=/opt/apps/jre7/ /opt/apps/smartgit/bin/smartgit.sh | |
Icon=/opt/apps/smartgit/bin/smartgit-64.png |