Skip to content

Instantly share code, notes, and snippets.

@iMerica
iMerica / viscosity-to-ios-connect.rb
Last active May 17, 2024 17:39 — forked from chrisboulton/viscosity-to-ios-connect.rb
Quickly convert all of your Viscosity connections into OVPN configuration files for OpenVPN for iOS (bundles certificates and keys in the files too)
Dir.glob("#{ENV['HOME']}/Library/Application Support/Viscosity/OpenVPN/*/config.conf").each do |file|
certificate_files = ['ca', 'cert', 'key', 'tls-auth']
config_dir = File.dirname(file)
connection_name = nil
new_config = []
File.read(file).lines.each do |line|
line.strip!
if line.start_with?('#viscosity name')
@fishi0x01
fishi0x01 / baseURL.groovy
Last active May 17, 2024 17:38
This is a collection of groovy scripts I gathered and use for bootstrapping Jenkins. Most of this can also be achieved with the CasC Plugin https://github.com/jenkinsci/configuration-as-code-plugin
#!groovy
/*
* This script configures the Jenkins base URL.
*/
import jenkins.model.JenkinsLocationConfiguration
JenkinsLocationConfiguration location = Jenkins.instance.getExtensionList('jenkins.model.JenkinsLocationConfiguration')[0]
location.url = 'https://jenkins-as-code-poc.devtail.io/'
@balazsorban44
balazsorban44 / apple-gen-secret.mjs
Created November 27, 2021 13:08
Script to generate Apple Client secret
#!/bin/node
import { SignJWT } from "jose"
import { createPrivateKey } from "crypto"
if (process.argv.includes("--help") || process.argv.includes("-h")) {
console.log(`
Creates a JWT from the components found at Apple.
By default, the JWT has a 6 months expiry date.
Read more: https://developer.apple.com/documentation/sign_in_with_apple/generate_and_validate_tokens#3262048
@CMCDragonkai
CMCDragonkai / nix_string_and_path_concatenation.md
Last active May 17, 2024 17:37
Nix: String and Path Concatenation #nix #nixos

Nix String and Path Concatenation

From Bas van Dijk:

To understand these things I would recommend using nix-repl:

$ nix-repl
Welcome to Nix version 1.11.2. Type :? for help.
@keithmorris
keithmorris / drive-format-ubuntu.md
Last active May 17, 2024 17:37
Partition, format, and mount a drive on Ubuntu
@VAnsimov
VAnsimov / HostingView Example.swift
Last active May 17, 2024 17:37
SwiftUI View to UIView
import UIKit
import SwiftUI
// SwiftUI
struct SomeView: View {
var body: some View {
Text("Hello World!")
}
}
@undefinedroot
undefinedroot / Redmi 9 Global Debloat List.txt
Last active May 17, 2024 17:36
Redmi 9 Global Debloat List
Code name: lancelot
MIUI version: MIUI Global 11.0.8 Stable 11.0.8.0 (QJCMIXM)
Android version: 10 QP1A.190711.020
Model: M2004J19G
Kernel version: 4.14.141-perf-g54df45d
note: do not update your phone yet (do not connect to wifi, disable mobile data)
if you can't access usb debugging (even if you already enabled it on developer options),
@biast12
biast12 / Replace-twitter-logo.user.js
Last active May 17, 2024 17:35
Replaces the X logo with the old Twitter logo
// ==UserScript==
// @name Replaces the X logo with the old Twitter logo
// @description Replaces the X logo with the old Twitter logo by Biast12
// @icon https://abs.twimg.com/favicons/twitter.ico
// @version 1.0.6
// @author Biast12
// @namespace https://twitter.com/Biast12
// @homepageURL https://gist.github.com/biast12/04f66af3297b9395ec489f7eb16a9286
// @supportURL https://gist.github.com/biast12/04f66af3297b9395ec489f7eb16a9286
// @updateURL https://gist.github.com/biast12/04f66af3297b9395ec489f7eb16a9286/raw/Replace-twitter-logo.user.js
@joshbuchea
joshbuchea / semantic-commit-messages.md
Last active May 17, 2024 17:38
Semantic Commit Messages

Semantic Commit Messages

See how a minor change to your commit message style can make you a better programmer.

Format: <type>(<scope>): <subject>

<scope> is optional

Example

@code-boxx
code-boxx / 0-JS-TTS.MD
Last active May 17, 2024 17:35
Javascript Text To Speech