Skip to content

Instantly share code, notes, and snippets.

@SergiOn
SergiOn / webcrypto-examples.md
Created February 4, 2022 19:29 — forked from pedrouid/webcrypto-examples.md
Web Cryptography API Examples

Direct copy of pre-encoded file:

$ ffmpeg -i filename.mp4 -codec: copy -start_number 0 -hls_time 10 -hls_list_size 0 -f hls filename.m3u8

@SergiOn
SergiOn / HTTPStatusCode.swift
Created July 17, 2020 14:55 — forked from ollieatkinson/HTTPStatusCode.swift
HTTP status codes as a Swift enum.
/// This is a list of Hypertext Transfer Protocol (HTTP) response status codes.
/// It includes codes from IETF internet standards, other IETF RFCs, other specifications, and some additional commonly used codes.
/// The first digit of the status code specifies one of five classes of response; an HTTP client must recognise these five classes at a minimum.
enum HTTPStatusCode: Int, Error {
/// The response class representation of status codes, these get grouped by their first digit.
enum ResponseType {
/// - informational: This class of status code indicates a provisional response, consisting only of the Status-Line and optional headers, and is terminated by an empty line.
case informational
@SergiOn
SergiOn / linebreak.md
Created July 1, 2020 15:46
Line breaks in markdown
Hello  (<-- two spaces)
World

Hello
World


MongoDB Cheat Sheet

Show All Databases

show dbs

Show Current Database

@SergiOn
SergiOn / MyLoggerConfig.java
Created May 11, 2019 16:24 — forked from darbyluv2code/MyLoggerConfig.java
Spring Logging for Spring 5.1 - XML Configuration
package com.luv2code.springdemo;
import java.util.logging.ConsoleHandler;
import java.util.logging.Level;
import java.util.logging.Logger;
import java.util.logging.SimpleFormatter;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;
public class MyLoggerConfig {
@SergiOn
SergiOn / gist:63101989f2b87be80027c7056eba3bce
Created April 22, 2019 11:03 — forked from ehuynh/gist:2572398
Start and Stop Jenkins on OSX
# start
sudo launchctl load /Library/LaunchDaemons/org.jenkins-ci.plist
# stop
sudo launchctl unload /Library/LaunchDaemons/org.jenkins-ci.plist
@SergiOn
SergiOn / Free O'Reilly Books.md
Created August 4, 2018 18:18 — forked from augbog/Free O'Reilly Books.md
Free O'Reilly Books

Free O'Reilly books and convenient script to just download them.

Thanks /u/FallenAege/ and /u/ShPavel/ from this Reddit post

How to use:

  1. Take the download.sh file and put it into a directory where you want the files to be saved.
  2. cd into the directory and make sure that it has executable permissions (chmod +x download.sh should do it)
  3. Run ./download.sh and wee there it goes. Also if you do not want all the files, just simply comment the ones you do not want.
@SergiOn
SergiOn / angular.md
Created May 23, 2018 21:53 — forked from sinedied/angular.md
The Missing Introduction to Angular 2 and Modern Design Patterns

Introduction to Angular

Angular (aka Angular 2) is a new framework completely rewritten from the ground up, replacing the famous AngularJS framework (aka Angular 1.x).

More that just a framework, Angular should now be considered as a whole platform which comes with a complete set of tools, like its own CLI, debug utilities or performance tools.

Getting started