Skip to content

Instantly share code, notes, and snippets.

View SiriusDely's full-sized avatar

Sirius Dely SiriusDely

View GitHub Profile
@zaru
zaru / request.rb
Created March 23, 2020 09:39
AWS SNS publish api curl request
require 'json'
require 'aws-sigv4'
require 'active_support/core_ext'
params = {
'Action' => 'Publish',
'TargetArn' => 'arn:aws:sns:ap-northeast-1:000000000000:example-topic',
'Message' => 'message',
'Version' => '2010-03-31'
}.to_query
@bespokoid
bespokoid / SpaceVim.md
Last active July 17, 2024 07:37
SpaceVim cheatsheet #tools
@Bnaya
Bnaya / index.ts
Last active July 16, 2022 11:55
Typescript Types indirect re-export with isolatedModules: true
// Cannot re-export a type when the '--isolatedModules' flag is provided.ts(1205)
export { IMyInterface } from "./types"
// this works!
import { IMyInterface as IMyInterfaceForExport } from "./types"
export type IMyInterface = IMyInterfaceForExport;
// And Also:
export type IMyInterface2 = import("./types").IMyInterface;
@stevensacks
stevensacks / DatePicker.js
Last active June 26, 2023 08:59
React Bulma DatePicker
import {addDays, format, isAfter, isBefore, startOfDay} from 'date-fns';
import React, {Component, Fragment} from 'react';
import classes from 'classnames';
import DatePickerDialog from './DatePickerDialog';
import Dialog from 'components/Dialog';
import {FontAwesomeIcon} from '@fortawesome/react-fontawesome';
import {getDisabled} from '../../../utils/component';
import PropTypes from 'prop-types';
import './index.css';
@legowerewolf
legowerewolf / hyperstart.bat
Last active December 29, 2023 16:45
Selecting a shell on startup in the Hyper terminal emulator
@ECHO off
:top
CLS
ECHO Choose a shell:
ECHO [1] cmd
ECHO [2] bash
ECHO [3] PowerShell
ECHO [4] Python
ECHO.
ECHO [5] restart elevated
@boneskull
boneskull / README.md
Last active April 10, 2024 12:47
example of how to debug mocha v4 if hanging

Here's an example of how to debug Mocha v4 if it hangs.

Ensure you're using a Node.js 8 or newer (or any version with async_hooks support).

If you run your test, you'll notice it hangs:

$ mocha test.js
This file has been truncated, but you can view the full file.
9254835974458887629672873635789957411886024698554157393849494864228024962939550688297074527198420261051675205999609689838587412
7948702662533481896767559573369920938242346354580061545409242090168773727371802699309443935396635866263937828773324526334321892
7929250312741837331511829643632683169694074912332726993582394725302853411901337696207186358524323117172520907433878952968176465
9486937364148093931718552300016332142708943190856638524388888569011747617956915519539025796115901484762122047712200094207683584
0703675740855407318047361595661595146837376373951978537785605481083388906490085533348547865459237835407372374738389274773789264
3524314516560200536698529022539598732463389124803873184044464663165630452635665559603483233341839268186056673186867104904449866
3388466377320953222057779182433549144340237502432464295061371141084500222833875925546082542869030852833895137466510262849050187
2359980877010447170873386178573828860442255448874794721230413368694441497441338856684036949118353204002591974711928301953002372
@scokmen
scokmen / HttpStatusCode.ts
Created April 25, 2017 11:10
Typescript Http Status Codes Enum
"use strict";
/**
* Hypertext Transfer Protocol (HTTP) response status codes.
* @see {@link https://en.wikipedia.org/wiki/List_of_HTTP_status_codes}
*/
enum HttpStatusCode {
/**
* The server has received the request headers and the client should proceed to send the request body
@Yousha
Yousha / .gitignore
Last active August 25, 2023 07:44
.gitignore for Java/Android developers.
##### Windows
# Windows thumbnail cache files
Thumbs.db
Thumbs.db:encryptable
ehthumbs.db
ehthumbs_vista.db
# Dump file
*.stackdump
@Timi7007
Timi7007 / README.md
Last active December 20, 2022 15:09
Collection on all things HTTPS. Includes settings for TLS on nginx (which desperately need an update!).

Why HTTPS?

Collection on all things HTTPS. Includes settings for TLS on nginx (which desperately need an update!).


Until I update this, I'd recommend you take a look at https://github.com/jukbot/setup-nginx-webserver

My current settings for TLS on nginx/1.10.3 on Ubuntu Server 16.04 LTS

See https://www.nginx.com/resources/wiki/start/topics/tutorials/install/#official-debian-ubuntu-packages on how to install the lastest version of nginx.

Most settings are sourced from https://bettercrypto.org/static/applied-crypto-hardening.pdf#subsection.2.1.3, https://danpalmer.me/blog/ssl-labs-grade-a, https://gist.github.com/plentz/6737338 and https://scotthelme.co.uk/