Skip to content

Instantly share code, notes, and snippets.

@piccaso
piccaso / iemode.html
Created February 29, 2024 09:31
ie mode detection
<html>
<head>
<title>ie mode</title>
</head>
<body>
<marquee>IE MODE</marquee>
</body>
<script>
window.setTimeout(function(){
@piccaso
piccaso / dbd.ini
Created March 21, 2023 10:01
dbd 120 fps
%localappdata%\DeadByDaylight\Saved\Config\WindowsNoEditor
=======================================
Engine.ini :
[/script/engine.engine]
bSmoothFrameRate=false
MinSmoothedFrameRate=5
MaxSmoothedFrameRate=120
bUseVSync=false
@piccaso
piccaso / ssh.cs
Last active December 7, 2022 07:07
ssh.net Example - Keybased Authentication, File Upload, Shell Commands
/*
get SSH.NET (BSD License: http://sshnet.codeplex.com/license)
with NuGet:
>Install-Package SSH.NET -Version 2013.4.7
or just get the dll from here: http://j.mp/sshNet
*/
using System;
@piccaso
piccaso / gist:4179759
Created December 1, 2012 00:30
win32 GetLastInputInfo C# example
using System;
using System.Runtime.InteropServices;
using System.ComponentModel;
namespace GetLastUserInput
{
public class GetLastUserInput
{
private struct LASTINPUTINFO
{
@piccaso
piccaso / typo3-6.2-quickinstall.sh
Last active August 29, 2022 14:31
ment to be run from a bash shell: source <(curl -sSLk http://git.io/vLlAM)
# quick install:
# source <(curl -sSLk https://gist.githubusercontent.com/piccaso/2ff65b87ef907f286b9d/raw/typo3-6.2-quickinstall.sh)
curl -sSLk -o typo3_src.tgz 'https://get.typo3.org/6.2'
tar -zxf typo3_src.tgz
rm typo3_src.tgz
ln -s typo3_src-6.2.* typo3_src
ln -s typo3_src/index.php index.php
ln -s typo3_src/typo3 typo3
@piccaso
piccaso / lobmosq.c
Created September 6, 2016 10:15
libmosquitto example
/*
needs libmosquitto-dev
$ gcc -o libmosq libmosq.c -lmosquitto
*/
#include <stdio.h>
#include <mosquitto.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
async function tryHarder(howHard, delay, callback) {
let wait = (milliseconds) => new Promise(resolve => setTimeout(resolve, milliseconds));
while (true) {
try {
return await callback();
} catch (ex) {
if (--howHard < 1) throw (ex);
}
await wait(delay);
}
# todo: see if --device can be used
docker run --rm -it --privileged -v $PWD:/pwd -w /pwd ubuntu:19.10
docker run --rm -it --privileged -v $PWD:/pwd -w /pwd debian:10
# make, curl, git, ...
# stlink-tools (https://github.com/texane/stlink#installation)
# gcc-arm-toolchain (https://developer.arm.com/tools-and-software/open-source-software/developer-tools/gnu-toolchain/gnu-rm/downloads)
apt-get update && apt-get install -y make git-core stlink-tools gcc-arm-none-eabi
# FreeJoy
@piccaso
piccaso / gotenberg.cs
Created November 19, 2019 14:47
using gotenberg from dot net (c#)
using var client = new HttpClient {BaseAddress = new Uri("https://localhost:3000/")};
using var content = new MultipartFormDataContent {
{new StringContent(html), "files", "index.html"},
{new StringContent("8.27"), "paperWidth"},
{new StringContent("11.69"), "paperHeight"},
{new StringContent("0"), "marginTop"},
{new StringContent("0"), "marginBottom"},
{new StringContent("0"), "marginLeft"},
{new StringContent("0"), "marginRight"},
{new StringContent("true"), "landscape"}

Keybase proof

I hereby claim:

  • I am piccaso on github.
  • I am 0xf10 (https://keybase.io/0xf10) on keybase.
  • I have a public key ASB-1ICagn2bExPuoBcQxVxdPbVM5mLsb6Hh7rNGYK0N4Ao

To claim this, I am signing this object: