This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
if [[ $EUID -ne 0 ]]; then | |
echo "This script must be run as root" | |
exit 1 | |
fi | |
launchctl stop /Library/LaunchAgents/com.citrix.AuthManager_Mac.plist | |
launchctl stop /Library/LaunchAgents/com.citrix.ReceiverHelper.plist | |
launchctl stop /Library/LaunchAgents/com.citrix.ServiceRecords.plist |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/awk -f | |
# | |
# AUTHOR: Jardel Weyrich <jweyrich at gmail dot com> | |
# REQUIRES: awk >= 4.0.0 (macOS awk won't work as of macOS 10.12.4) | |
# | |
# | |
# ELB log format - REFERENCE: http://docs.aws.amazon.com/elasticloadbalancing/latest/classic/access-log-collection.html | |
# | |
# 1 timestamp |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
set $needs_https_redir 1; | |
# Do not force HTTPS if the client is directly connecting to this server via | |
# HTTPS. | |
if ($scheme = 'https') { | |
set $needs_https_redir 0; | |
} | |
# Do not force HTTPS if the client is indireclty connecting to this server via | |
# HTTPS and the gateway tells us that through the X-Forwarded-Proto header. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
namespace Demo | |
{ | |
public interface IBaseOperationReport | |
{ | |
List<string> ErrorMessages { get; } | |
bool HasErrorMessages { get; } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// Author: Jardel Weyrich <jardel at teltecsolutions dot com dot br> | |
// Date: 2016-08-16 | |
// | |
var AWS = require('aws-sdk'); | |
var s3 = new AWS.S3(); | |
var path = require('path'); | |
var fs = require('fs'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# | |
# AUTHOR : Jardel Weyrich <[email protected]> | |
# DESCRIPTION: Renew expiring certificates that were already issued via letsencrypt | |
# and reside in `/etc/letsencrypt/live/$DOMAIN/`. | |
# The domain authentication is done via WEBROOT. It starts an instance | |
# of `lighttpd` that serves files on `/var/www`, do the renew process using | |
# `letsencrypt-auto`, and then stops the `lighttpd` instance. | |
# The updated certificates are then moved to `/etc/haproxy/certs/$DOMAIN.pem` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# | |
# Dependencies: | |
# $ pip install python-telegram-bot --upgrade | |
# | |
import sys, telegram | |
BOT_TOKEN='CHANGEME' | |
DESTINATION=int(sys.argv[1]) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /bin/sh | |
### BEGIN INIT INFO | |
# Provides: glassfish | |
# Required-Start: $local_fs $remote_fs $syslog $network | |
# Required-Stop: $local_fs $remote_fs $syslog $network | |
# Default-Start: 2 3 4 5 | |
# Default-Stop: 0 1 6 | |
# Short-Description: Start Glassfish at boot time | |
# Description: Enable service provided by Glassfish | |
### END INIT INFO |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// ORIGINAL CODE: http://stackoverflow.com/questions/17806760/binary-expression-tree-c | |
// | |
#include <cassert> | |
#include <iostream> | |
template <typename ExpressionT> | |
struct expression | |
{ |