Skip to content

Instantly share code, notes, and snippets.

@technion
technion / size_t.c
Last active February 25, 2017 08:20
#include <stdio.h>
#include <unistd.h>
int returnsnegative() {
return -5;
}
ssize_t my_write(int fd, const void *buf, size_t count) {
/* This functions has the same function prototype as write() */
/* For more information: https://linux.die.net/man/2/write */
#!/usr/bin/env ruby
require 'openssl'
def subject_alt_name(domains)
domains = domains.split(/,/)
ef = OpenSSL::X509::ExtensionFactory.new
ef.create_extension("subjectAltName",
domains.map { |d| "DNS: #{d}" }.join(','))
# Source
#include <stdio.h>
#include <stdlib.h>
struct node {
int something;
struct node *next;
};
# sh /code/run.sh
[value] Analyzing a complete application starting at main
[value] Computing initial state
[value] Initial state computed
/code/src/test.c:59:[value] warning: argument version has type int but format indicates unsigned int
[value] warning: Continuing analysis because this seems innocuous
Test Argon2i version number: 13
Param(
[Parameter(Mandatory=$true)]
[string]$FileOwner,
[string]$Unlock
)
$Shares = Get-WmiObject -Class win32_share -filter "type=0 and not name like 'PRINT$' and not name like 'SYSVOL' and not name like 'NETLOGON'"
if ($Unlock) {
ForEach ($Share in $Shares) {
UnBlock-SmbShareAccess -Name $Share.Name -AccountName $FileOwner -force
}
# Base image
FROM debian:stable
MAINTAINER Infer
# Debian config
RUN apt-get update && \
apt-get install -y --no-install-recommends \
build-essential \
curl \
@technion
technion / acme-client-runner.rb
Last active August 8, 2023 16:29
Runs Acme Client
#!/usr/bin/env ruby
# We're going to need a private key.
require 'openssl'
# Initialize the client
require 'acme/client'
# We need an ACME server to talk to, see github.com/letsencrypt/boulder
ENDPOINT = 'https://acme-v01.api.letsencrypt.org/'
#ENDPOINT = 'https://acme-staging.api.letsencrypt.org'
ACCOUNT_FILE = 'account_key.pem'
def instacheck(name)
unless /[a-z0-9._]{,30}/.match(name)
return false
end
if /\.\./.match(name)
return false
end
diff --git a/lib/acme/client.rb b/lib/acme/client.rb
index 52d9add..04e1f0a 100644
--- a/lib/acme/client.rb
+++ b/lib/acme/client.rb
@@ -49,18 +49,9 @@ class Acme::Client
end
def load_directory!
- @operation_endpoints = if @directory_uri
- response = connection.get(@directory_uri)
$ curl -i "http://localhost:8089/?testing"
HTTP/1.1 500 Internal Server Error
connection: keep-alive
server: Cowboy
date: Thu, 30 Jul 2015 09:57:55 GMT
content-length: 0
At the console:
Eshell V7.0 (abort with ^G)