Skip to content

Instantly share code, notes, and snippets.

View petermolnar-dev's full-sized avatar

Peter Molnar petermolnar-dev

View GitHub Profile
@Ravi61
Ravi61 / CustomDateCoding.swift
Created July 13, 2017 15:16
Custom Date Encoding/Decoding
// Custom Date Decoding
jsonDecoder.dateDecodingStrategy = .custom({ (decoder) -> Date in
let data = try decoder.singleValueContainer().decode(String.self)
//perform your operation on obtained string
let disturbance = "01-07-1977"
let formatter = DateFormatter()
formatter.dateFormat = "dd-MM-yyyy"
if data == "First disturbance in force" {
return formatter.date(from: disturbance) ?? Date()
} else {
@ankitbko
ankitbko / prayer.txt
Last active November 14, 2023 01:07
Programmer's Prayer
Our program, who art in memory,
called by thy name;
thy operating system run;
thy function be done at runtime
as it was on development.
Give us this day our daily output.
And forgive us our code duplication,
as we forgive those who
duplicate code against us.
And lead us not into frustration;
@MoathOthman
MoathOthman / gist:b3cef77057028e4c2e70
Created March 3, 2015 07:18
Convert from p12 to PEM Terminal
openssl pkcs12 -in Certificatesdev.p12 -out Certificatesdev.pem -nodes -clcerts
@dergachev
dergachev / GIF-Screencast-OSX.md
Last active April 19, 2024 11:00
OS X Screencast to animated GIF

OS X Screencast to animated GIF

This gist shows how to create a GIF screencast using only free OS X tools: QuickTime, ffmpeg, and gifsicle.

Screencapture GIF

Instructions

To capture the video (filesize: 19MB), using the free "QuickTime Player" application: