Skip to content

Instantly share code, notes, and snippets.

View iamlordvodemort's full-sized avatar

Anthony Layne iamlordvodemort

View GitHub Profile
@iamlordvodemort
iamlordvodemort / jwtRS256.sh
Created October 29, 2023 16:01 — forked from ygotthilf/jwtRS256.sh
How to generate JWT RS256 key
ssh-keygen -t rsa -b 4096 -m PEM -f jwtRS256.key
# Don't add passphrase
openssl rsa -in jwtRS256.key -pubout -outform PEM -out jwtRS256.key.pub
cat jwtRS256.key
cat jwtRS256.key.pub
@iamlordvodemort
iamlordvodemort / .bashrc
Created May 29, 2019 18:04 — forked from jmoody/.bashrc
Jenkins LaunchAgent and scripts for El Capitan
# Can be more or less complicated depending on your CLI needs.
export HISTCONTROL=erasedups
export HISTSIZE=5000
shopt -s histappend
export VISUAL=less
export EDITOR=vim
export GIT_EDITOR="${EDITOR}"
@iamlordvodemort
iamlordvodemort / multiple_ssh_setting.md
Created February 7, 2019 16:20 — forked from jexchan/multiple_ssh_setting.md
Multiple SSH keys for different github accounts

Multiple SSH Keys settings for different github account

create different public key

create different ssh key according the article Mac Set-Up Git

$ ssh-keygen -t rsa -C "your_email@youremail.com"

I just had to set up Jenkins to use GitHub. My notes (to myself, mostly):

Detailed Instructions

For setting up Jenkins to build GitHub projects. This assumes some ability to manage Jenkins, use the command line, set up a utility LDAP account, etc. Please share or improve this Gist as needed.

Install Jenkins Plugins

let word = "abcdefg"
//Using swift lib
String(word.characters.reverse()) //"gfedcba"
//Using char array and insert
func reverseString(wordToReverse: String) -> String {
guard wordToReverse.characters.count > 1 else {
return wordToReverse
}
@iamlordvodemort
iamlordvodemort / keyboard.swift
Created March 24, 2018 00:23 — forked from nazywamsiepawel/keyboard.swift
handling keyboard Notifications with swift 3.swift
override function viewDidLoad() {
...
NotificationCenter.default.addObserver(self, selector: #selector(keyboardWillShow), name: NSNotification.Name.UIKeyboardWillShow, object: nil)
NotificationCenter.default.addObserver(self, selector: #selector(keyboardWillHide), name: NSNotification.Name.UIKeyboardWillHide, object: nil)
NotificationCenter.default.addObserver(self, selector: #selector(keyboardWillChangeFrame), name: NSNotification.Name.UIKeyboardWillChangeFrame, object: nil)
...
}
@iamlordvodemort
iamlordvodemort / Macros.swift
Created November 30, 2017 17:07 — forked from xmzio/Macros.swift
My aLog and dLog macros in Swift (to abbreviate NSLog)
//
// Macros.swift
//
// Created by Xavier Muñiz on 6/12/14.
import Foundation
// dLog and aLog macros to abbreviate NSLog.
// Use like this:
NSString *uberPath = [NSString stringWithFormat:@"uber://?client_id=%@&action=setPickup&pickup[latitude]=%@&pickup[longitude]=%@&pickup[nickname]=Current Location&dropoff[latitude]=%@&dropoff[longitude]=%@&dropoff[nickname]=%@&dropoff[formatted_address]=%@&partner_deeplink=%@",
kUberClientId,
[NSString stringWithFormat:@"%f", currentLocation.coordinate.latitude],
[NSString stringWithFormat:@"%f", currentLocation.coordinate.longitude],
[NSString stringWithFormat:@"%f", [destination.coordinate.latitude doubleValue]],
[NSString stringWithFormat:@"%f", [destination.coordinate.longitude doubleValue]],
destination.name,
destination.address,
partner_deeplink_url];