Skip to content

Instantly share code, notes, and snippets.

View shamoh's full-sized avatar

Libor Kramoliš shamoh

View GitHub Profile
@stevenroose
stevenroose / enable_ssl.dart
Last active June 4, 2021 06:25
Setup CA-enabled SSL for Dart
void enableSSL() {
// the password used for the certutil db
var sslPassword = "";
// the certificate subject
// retrieved from certutil with command
// > certutil -d sql:. -L -n my_domain
// and look for the "Subject: " line under certificate data
var certificateName = "CN=mydomain.com,OU=...";
@timyates
timyates / .gvm_completion.sh
Last active December 17, 2015 13:49
Quick and dirty GVM bash autocompletion
_gvm_complete()
{
local CANDIDATES
COMPREPLY=()
if [ $COMP_CWORD -eq 1 ]; then
COMPREPLY=( $(compgen -W "install uninstall rm list use current version default selfupdate broadcast offline help flush" -- ${COMP_WORDS[COMP_CWORD]}) )
elif [ $COMP_CWORD -eq 2 ]; then
case "${COMP_WORDS[COMP_CWORD-1]}" in
@mojavelinux
mojavelinux / StartupBean.java
Created October 20, 2010 03:41
A sample CDI extension for eagerly instantiating @ApplicationScoped beans annotated @startup
@ApplicationScoped
@Startup
public class StartupBean
{
@PostConstruct
public void onStartup()
{
System.out.println("Application starting up.");
}
}