Skip to content

Instantly share code, notes, and snippets.

View tomasen's full-sized avatar
😞

SHEN SHENG tomasen

😞
View GitHub Profile
IKE:3DES_CBC/HMAC_SHA1_96/PRF_HMAC_SHA1/MODP_1024,
IKE:3DES_CBC/HMAC_SHA2_256_128/PRF_HMAC_SHA2_256/MODP_1024,
IKE:3DES_CBC/HMAC_SHA2_384_192/PRF_HMAC_SHA2_384/MODP_1024,
IKE:AES_CBC_128/HMAC_SHA1_96/PRF_HMAC_SHA1/MODP_1024,
IKE:AES_CBC_128/HMAC_SHA2_256_128/PRF_HMAC_SHA2_256/MODP_1024,
IKE:AES_CBC_128/HMAC_SHA2_384_192/PRF_HMAC_SHA2_384/MODP_1024,
IKE:AES_CBC_192/HMAC_SHA1_96/PRF_HMAC_SHA1/MODP_1024,
IKE:AES_CBC_192/HMAC_SHA2_256_128/PRF_HMAC_SHA2_256/MODP_1024,
IKE:AES_CBC_192/HMAC_SHA2_384_192/PRF_HMAC_SHA2_384/MODP_1024,
IKE:AES_CBC_256/HMAC_SHA1_96/PRF_HMAC_SHA1/MODP_1024,
# ipsec.secrets
# RSA private key for this host, authenticating it to any other host which knows the public part.
your.host.name : RSA "privkey.pem"
# username password list
your.username : EAP "your.password"
@tomasen
tomasen / ipsec.conf
Last active December 26, 2020 15:48
# ipsec.conf - strongSwan IPsec configuration file
# use IKEv2 protocol
keyexchange=ikev2
# server certificate
leftcert=cert.pem
# use eap-mschapv2 protocol - auth by username/password
FlipView(
VStack { Text("Front") },
VStack { Text("Back") },
tap: {
PlaySound(sound)
},
flipped: self.$flipped,
disabled: self.$disabled
)
@tomasen
tomasen / RandomFetch.swift
Created April 2, 2020 05:46
Fetch a random row from a CoreData entity
func RandomFetch() -> Item? {
let req = NSFetchRequest<NSFetchRequestResult>(entityName: "MyEntity")
req.predicate = NSPredicate(format: "duedate > %@", due as NSDate)
// find out how many items are there
let totalresults = try! mContext.count(for: req)
if totalresults > 0 {
// randomlize offset
req.fetchOffset = Int.random(in: 0..<totalresults)
req.fetchLimit = 1
@tomasen
tomasen / LandingView.vue
Created May 17, 2018 08:22
SPlayer@2018 LandingView Code Snippets
<template>
<div id="wrapper">
<main>
<div>
<img id="logo" src="~@/assets/logo.png" alt="electron-vue">
</div>
<div class="welcome">
<div class="title">SPlayerX</div>
<p> {{ version }} </p>

Welcome