Skip to content

Instantly share code, notes, and snippets.

View shukebeta's full-sized avatar
🎯
Focusing

David Wei shukebeta

🎯
Focusing
View GitHub Profile
@wesleyegberto
wesleyegberto / convert-postman-to-insomnia.js
Created September 22, 2020 05:57
Script to convert a Postman backupt to Insomnia
/**
* Script to parse a Postman backupt to Insomnia keeping the same structure.
*
* It parses:
* - Folders
* - Requests
* - Environments
*
* Notes: Insomnia doesn't accept vars with dots, if you are using you must replace yours URLs manually (see ENVIRONMENTS_EXPORTS).
*/
@shukebeta
shukebeta / mysql_secure.sh
Last active June 9, 2020 05:14 — forked from coderua/mysql_secure.sh
This is a CentOS8 version for MySQL8
#!/bin/bash
#
# Automate mysql secure installation for Redhat/CentOS systems
#
# - You can set a password for root accounts.
# - You can remove root accounts that are accessible from outside the local host.
# - You can remove anonymous-user accounts.
# - You can remove the test database (which by default can be accessed by all users, even anonymous users),
# and privileges that permit anyone to access databases with names that start with test_.
@changhuixu
changhuixu / CronJobService.cs
Last active December 14, 2022 14:01
schedule cron job. IHostedService, asp.net core
public abstract class CronJobService : IHostedService, IDisposable
{
private System.Timers.Timer _timer;
private readonly CronExpression _expression;
private readonly TimeZoneInfo _timeZoneInfo;
protected CronJobService(string cronExpression, TimeZoneInfo timeZoneInfo)
{
_expression = CronExpression.Parse(cronExpression);
_timeZoneInfo = timeZoneInfo;
@mykeels
mykeels / RsaKeyService.cs
Last active January 26, 2024 03:47
For IdentityServer4's AddSigningCredentials in production
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Security.Cryptography;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Hosting;
using Microsoft.IdentityModel.Tokens;
@k-vosswinkel
k-vosswinkel / async-await-vs-promises-errors.js
Last active November 9, 2020 03:01
Playing with promises and async/await
const returnsAPromise = (string) => (
new Promise((resolve, reject) => {
if (typeof string !== 'string') reject('Not a string!');
resolve(`String is a resolved promise now: ${string}`);
})
);
const myString = "Kait's string";
let isOurPromiseFinished = false;
@samoshkin
samoshkin / postman_vs_insomnia_comparison.md
Created November 6, 2018 17:42
Comparison of API development environments: Postman vs Insomnia

Postman vs Insomnia comparison

Postman | API Development Environment https://www.getpostman.com
Insomnia REST Client - https://insomnia.rest/

Features                                        Insomnia Postman Notes
Create and send HTTP requests x x
Authorization header helpers x x Can create "Authorization" header for you for different authentication schemes: Basic, Digest, OAuth, Bearer Token, HAWK, AWS
@mef
mef / how-to-run-oracle-sqlcl-git-bash-windows.md
Last active December 1, 2021 21:28
make Oracle sqlcl work in git bash (windows)

About

Notes about how to fix issues met when trying to run sqlcl from git bash on Windows

Environment

Running mintty v2.8.5 on a windows 10 machine.

$ uname -a
@hadisfr
hadisfr / outline-server-setup.md
Last active June 14, 2024 21:04 — forked from okeehou/outline-server-setup.md
How to setup an Outline VPN Server on Ubuntu 16.04

How to setup an Outline VPN Server on Ubuntu 16.04 Server

This guide will show you how to install Outline Server on an Ubuntu 16.04 Server and use Outline Manager.

Install Outline Manager

Outline Manager supports Windows, macOS and Linux.

Outline Manager for Windows

@H2NCH2COOH
H2NCH2COOH / markdown_in_nginx.md
Last active June 14, 2022 03:08
Markdown in Nginx

Markdown in Nginx

Nginx config

location ~ /.*\.md {
    root /www/;
    default_type text/html;
    charset UTF-8;
    add_before_body /strapdown/prepend;

add_after_body /strapdown/postpend;

@okeehou
okeehou / outline-server-setup.md
Last active May 8, 2024 05:27
How to setup an Outline VPN Server on Ubuntu 16.04

How to setup an Outline VPN Server on Ubuntu 16.04 Server

This guide will show you how to install Outline Server on an Ubuntu 16.04 Server, use Outline Manager for Windows and connect to your Outline Server on Windows and Anroid.

Install Outline Manager

Outline Manager supports Windows, macOS and Linux.

Outline Manager for Windows