Skip to content

Instantly share code, notes, and snippets.

@qqq-tech
qqq-tech / HttpClient.js
Created August 29, 2023 07:39 — forked from randyburden/HttpClient.js
Simple JavaScript HTTP Client. Supports GET and POST.
httpClient = {
get: function( url, data, callback ) {
var xhr = new XMLHttpRequest();
xhr.onreadystatechange = function () {
var readyState = xhr.readyState;
if (readyState == 4) {
callback(xhr);
}
@qqq-tech
qqq-tech / FirmAD.sh
Created June 1, 2023 12:58 — forked from cryptolok/FirmAD.sh
Firmware Automatic Dumping & Extraction Tool
#!/bin/bash
# this tool will automate firmware extraction and unpacking using FT232R-type adaptors (like BusPirate) and a SOIC clip placed on a chip to dump
# install the necessary software:
#$ sudo apt install flashrom binwalk || echo 'git clone?'
# pump up binwalk with additional packages and libraries
#$ bash <(curl -s https://raw.githubusercontent.com/devttys0/binwalk/master/deps.sh)
# place the clip on the chip, connect it to the adaptor, which sould be connected to your PC (with drivers installed) and launch the script:
# chip => clip => adaptor => PC => script
@qqq-tech
qqq-tech / HttpDigestAuthServlet.java
Created May 10, 2023 03:42 — forked from usamadar/HttpDigestAuthServlet.java
HTTP Servlet Sample Implmentation of HTTP Digest Authentication RFC 2617
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package com.example.http.authenticate;
import java.io.*;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.HashMap;
#include <iostream>
/// http://msdn.microsoft.com/en-us/library/windows/desktop/aa383745(v=vs.85).aspx#macros_for_conditional_declarations
#define _WIN32_WINNT 0x05010300 //Windows XP SP3
#include <windows.h>
#include <winbase.h>
#include <aclapi.h>
#include <sddl.h>
@qqq-tech
qqq-tech / rtcdc.js
Created January 4, 2023 00:41 — forked from cvan/rtcdc.js
using WebRTC Data Channels
if (!('performance' in window)) {
window.performance = {
now: function() {
return +new Date();
}
};
}
function trace(text) {
console.log((window.performance.now() / 1000).toFixed(3) + ": " + text);
@qqq-tech
qqq-tech / garp.c
Created September 13, 2022 05:39 — forked from seungwon0/garp.c
Send IPv4 Gratuitous ARP Packet
/* garp.c - Send IPv4 Gratuitous ARP Packet
Usage Example: sudo ./garp eth0
Copyright (C) 2011-2013 P.D. Buchan (pdbuchan@yahoo.com)
Copyright (C) 2013 Seungwon Jeong (seungwon0@gmail.com)
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or

Postgres Master Slave Failover & Failback

video

start

docker run -it --rm -p 5551:5432 --name=db1 --hostname=db1 ubuntu:20.04 bash
docker run -it --rm -p 5552:5432 --name=db2 --hostname=db2 ubuntu:20.04 bash
@qqq-tech
qqq-tech / Audio.cpp
Created July 14, 2022 23:41 — forked from PanagiotisPtr/Audio.cpp
WAV File Reader / Writer C++
#pragma once
#include "Audio.h"
Audio::Audio(std::string str) {
if (str.substr(str.size() - 4) != ".wav")
throw std::invalid_argument("Can only read WAV files!");
load_wav(str);
}
@qqq-tech
qqq-tech / unit.rb
Created June 16, 2022 01:06 — forked from sysprv/unit.rb
Simple example of VRRP-like master/slave behaviour
#! jruby
require 'java'
java_import 'java.net.InetSocketAddress'
java_import 'java.net.InetAddress'
java_import 'java.net.DatagramSocket'
java_import 'java.net.DatagramPacket'
java_import 'java.net.SocketTimeoutException'
java_import 'java.util.concurrent.SynchronousQueue'
@qqq-tech
qqq-tech / README.md
Created March 29, 2022 11:12 — forked from ksundong/README.md
토비님 스프링 부트 강의 정리

토비님의 스프링 부트 강의

스프링 부트가 무엇인지 궁금하면 레퍼런스 문서를 보세요!

⇒ 스프링 부트는 stand-alone, 업무에 사용할 수 있는 수준의 스프링 기반 애플리케이션을 쉽게 만들 수 있도록 만들어주는 프레임워크라고 생각하면 된다. (스프링에서 무엇을 선택할지 고민을 줄여주는 도구)

⇒ 스프링을 사용하는 것의 Best-Practice들이 적용되어 있음.

가능하면 인텔리제이 상용버전을 사용하세요.