Skip to content

Instantly share code, notes, and snippets.

View sakirtemel's full-sized avatar

Sakir Temel sakirtemel

View GitHub Profile
#!/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
# 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'
const { Client } = require("@notionhq/client");
const notionNewsDatabaseId = process.env.NOTION_NEWS_DATABASE_ID;
const allNews = await notion.databases.query({
database_id: notionNewsDatabaseId,
});
let fetchedNews = [];
// 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){
@sakirtemel
sakirtemel / gist:3d86fd3310455eb313b9
Created March 11, 2015 15:39
Simple form date picker input
# 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)
#!/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