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/ruby | |
# as gem google-apis-admin_directory_v1 | |
require "google/apis/admin_directory_v1" | |
require "googleauth" | |
require "googleauth/stores/file_token_store" | |
require "fileutils" | |
require 'securerandom' | |
require 'mail' |
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
from telethon import TelegramClient, events | |
from telethon.tl.types import PeerUser, PeerChat, PeerChannel | |
import os | |
import sys | |
from google.cloud import translate_v3 as translate | |
os.environ["GOOGLE_APPLICATION_CREDENTIALS"] = "/path/key.json" | |
gclient = translate.TranslationServiceClient() |
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
# 0 "test.c" | |
# 0 "<built-in>" | |
# 0 "<command-line>" | |
# 1 "/usr/include/stdc-predef.h" 1 3 4 | |
# 0 "<command-line>" 2 | |
# 1 "test.c" | |
# 1 "uthash.h" 1 | |
# 29 "uthash.h" | |
# 1 "/usr/include/string.h" 1 3 4 | |
# 26 "/usr/include/string.h" 3 4 |
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
# cleanzwsp.pl | |
# | |
# Cleans zero width spaces from text | |
# | |
use strict; | |
use vars qw($VERSION %IRSSI); | |
use Irssi; |
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
# Azure SSH support | |
USER root | |
RUN apt-get update \ | |
&& apt-get install -y --no-install-recommends openssh-server \ | |
&& echo "root:Docker!" | chpasswd | |
COPY sshd_config /etc/ssh/ | |
EXPOSE 2222 | |
#Depending on your actual application | |
COPY start_sshd.sh $SCRIPT_DIR/init_2_start_sshd.sh |
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/ruby | |
require 'vici' | |
require 'socket' | |
require 'syslog' | |
Syslog.open('ipsec-reconnect', Syslog::LOG_PID, Syslog::LOG_DAEMON | Syslog::LOG_LOCAL4) | |
# Requires uncommenting socket in /etc/strongswan.d/charon/vici.conf | |
v = Vici::Connection.new(UNIXSocket.new('/var/run/charon.vici')) |
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
sender_dependent_default_transport_maps = hash:/etc/postfix/sender_transport | |
smtp_sasl_auth_enable = yes | |
smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd | |
smtp_use_tls = yes | |
smtp_sasl_security_options = noanonymous |
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
<?php | |
session_start(); | |
require('vendor/autoload.php'); | |
$provider = new TheNetworg\OAuth2\Client\Provider\Azure([ | |
'clientId' => '12345678-1234-1234-1234-12345678abcd', | |
'clientSecret' => 'xxx', | |
'redirectUri' => 'https://example.com/auth', | |
'tenant' => 'example.com', | |
'scope' => 'openid email profile User.Read Directory.Read.All', |
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
// Compile with -lmicrohttpd | |
#include <arpa/inet.h> | |
#include <errno.h> | |
#include <limits.h> | |
#include <linux/rtnetlink.h> | |
#include <linux/types.h> | |
#include <microhttpd.h> | |
#include <net/if.h> | |
#include <stdio.h> |
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
https://api.slack.com/custom-integrations/legacy-tokens | |
/NETWORK ADD fooslack -autosendcmd "/MSG slack login xoxp-............" | |
/SERVER ADD -network fooslack -auto localhost 6669 | |
/CONNECT fooslack | |
/NETWORK ADD barslack -autosendcmd "/MSG slack login xoxp-............" | |
/SERVER ADD -network barslack -auto localhost 6669 | |
/CONNECT barslack |
NewerOlder