Skip to content

Instantly share code, notes, and snippets.

@henrydatei
henrydatei / vcs-downloader.sh
Last active March 9, 2023 09:34
Download a video from Videocampus Sachsen
#file=$1
#videoname=$(echo "$file" | cut -d "." -f1)
#echo "$videoname"
touch playlist.txt
touch urllist.txt
key=$1
videoname=$2
#keystring=$(cat $file | grep -o -E "key=[0-9,a-z]+")
@tehmas
tehmas / client.py
Created December 4, 2016 16:55
Sending OpenCV frames using Python TCP sockets
import cv2
import cPickle
import socket
import struct
TCP_IP = '127.0.0.1'
TCP_PORT = 9501
server_address = (TCP_IP, TCP_PORT)
i = 0
@mlocati
mlocati / win10colors.cmd
Last active May 14, 2024 19:29
ANSI Colors in standard Windows 10 shell
@echo off
setlocal
call :setESC
cls
echo %ESC%[101;93m STYLES %ESC%[0m
echo ^<ESC^>[0m %ESC%[0mReset%ESC%[0m
echo ^<ESC^>[1m %ESC%[1mBold%ESC%[0m
echo ^<ESC^>[4m %ESC%[4mUnderline%ESC%[0m
@mondain
mondain / public-stun-list.txt
Last active May 15, 2024 02:39
Public STUN server list
23.21.150.121:3478
iphone-stun.strato-iphone.de:3478
numb.viagenie.ca:3478
s1.taraba.net:3478
s2.taraba.net:3478
stun.12connect.com:3478
stun.12voip.com:3478
stun.1und1.de:3478
stun.2talk.co.nz:3478
stun.2talk.com:3478
Well, I suppose its `safe' to release this, it seems everyone and their dog has
it and apparantly (and to my surprise) it still works.
The `smurf' attack is quite simple. It has a list of broadcast addresses which
it stores into an array, and sends a spoofed icmp echo request to each of those
addresses in series and starts again. The result is a devistating attack upon
the spoofed ip with, depending on the amount of broadcast addresses used,
many, many computers responding to the echo request.
Before I continue may I first say that this code was a mistake. When it was
@kvannotten
kvannotten / connect_socket.swift
Created June 23, 2014 02:58
connecting to sockets in swift
var inputStream : NSInputStream?
var outputStream : NSOutputStream?
func connect() {
var readStream : Unmanaged<CFReadStream>?
var writeStream : Unmanaged<CFWriteStream>?
let host : CFString = NSString(string: self.host)
let port : UInt32 = UInt32(self.port)
CFStreamCreatePairWithSocketToHost(kCFAllocatorDefault, host, port, &readStream, &writeStream)
@mobilemind
mobilemind / git-tag-delete-local-and-remote.sh
Last active May 21, 2024 10:21
how to delete a git tag locally and remote
# delete local tag '12345'
git tag -d 12345
# delete remote tag '12345' (eg, GitHub version too)
git push origin :refs/tags/12345
# alternative approach
git push --delete origin tagName
git tag -d tagName
@andrewflash
andrewflash / php_mailer.php
Created November 23, 2013 05:32
Using PHP Mailer to Send HTML Emails with Images
<?php
require("class.phpmailer.php");
$mail = new PHPMailer();$mail = new PHPMailer();
$mail->IsSMTP();
$mail->Host = "smtp1.example.com;smtp2.example.com";
$mail->SMTPAuth = true;
$mail->Username = 'smtpusername';
$mail->Password = 'smtppassword';
$mail->From="mailer@example.com";