Skip to content

Instantly share code, notes, and snippets.

View smetal1's full-sized avatar
🎯
Focusing

smetal1

🎯
Focusing
View GitHub Profile
echo "GitLab SSL Configuration"
sudo mkdir -p /etc/gitlab/ssl
sudo chmod 755 /etc/gitlab/ssl
sudo mkdir -p ./sbl_tmp
sudo chmod 777 ./sbl_tmp
IS_GITLAB_IP=$(wget -q -O ./slb_tmp http://localhost | grep '200' ./sbl_tmp | wc -l)
until [ $IS_GITLAB_IP == 1 ];
do
echo "$IS_GITLAB_IP"
IS_GITLAB_IP=$(wget -q -O ./slb_tmp http://localhost | grep '200' ./slb_tmp | wc -l)
#!/bin/sh
set -o errexit
set -o nounset
IFS=$(printf '\n\t')
# Docker
sudo apt remove --yes docker docker-engine docker.io containerd runc
sudo apt update
@smetal1
smetal1 / test
Created November 20, 2019 16:43
var mqtt = require('mqtt');
//var client  = mqtt.connect('http://localhost:1883', {clientId: '5d344196b9801e6d0b110486/1234/android'});
var client  = mqtt.connect(‘localhost:1883/', {clientId: '5d344196b9801e6d0b110486/1234/android'});
client.on('connect', function () {
    client.subscribe('chat:5d344196b9801e6d0b110486');
    //client.subscribe('msgReadStatus:57964c1a2014c4544afb8efe/5c718e3d6fd9fae6afe2f83b');
    /*const msgReadStatusPayload = {
        tenantId: "57964c1a2014c4544afb8efe",
        sendereRTCUserId: "5c718e3d6fd9fae6afe2f83b",
        msgUniqueId: "5c9e76ee0d802dfa8ef81b7f",
sudo apt-get update
apt install -y default-jdk
wget -q -O - https://jenkins-ci.org/debian/jenkins-ci.org.key | sudo apt-key add -
sudo sh -c 'echo deb http://pkg.jenkins-ci.org/debian binary/ > /etc/apt/sources.list.d/jenkins.list'
sudo apt-get -y update
sudo apt-get -y install jenkins
import java.io.BufferedReader;
import java.io.File;
import java.io.InputStreamReader;
public class FormatConvo {
public static void main(String[] args) {
// TODO Auto-generated method stub
File test=new File("test.xlsx");
System.out.println(Converter(test, "pdf", "test"));
@smetal1
smetal1 / kube service
Created December 7, 2018 08:03
Problem accessing the API from external Address assigned in kubernetes(able to ping it)
---
apiVersion: v1
kind: Service
metadata:
name: app
spec:
selector:
name: app-server
externalTrafficPolicy: Cluster
ports:
Error from server (Forbidden): error when creating "redis-pv-ebs.yml": persistentvolumes "ebs" is forbidden: error querying AWS EBS volume vol-01ed6a9c3fc0d4e90: error finding instance i-069a3cd738c463ffa: "error listing AWS instances: \"NoCredentialProviders: no valid providers in chain. Deprecated.\\n\\tFor verbose messaging see aws.Config.CredentialsChainVerboseErrors\""
<?php
//Data, connection, auth
// $dataFromTheForm = $_POST['fieldName']; // request data from the form
$soapUrl = "http://www.webservicex.net/globalweather.asmx?WSDL"; // asmx URL of WSDL
// xml post structure
$xml_post_string = '<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">