Skip to content

Instantly share code, notes, and snippets.

@LeoMartinDev
LeoMartinDev / main.rs
Created April 2, 2023 13:45
Make Tauri app fullscreen
// Prevents additional console window on Windows in release, DO NOT REMOVE!!
#![cfg_attr(not(debug_assertions), windows_subsystem = "windows")]
use tauri::Manager;
fn main() {
tauri::Builder::default()
.setup(|app| {
let main_window = app.get_window("main").unwrap();
@LeoMartinDev
LeoMartinDev / .block
Last active March 31, 2020 13:58
fresh block
license: mit
@LeoMartinDev
LeoMartinDev / index.js
Created January 13, 2020 21:26
puppeteer-extra with stealth plugin
const puppeteer = require('puppeteer-extra');
const StealthPlugin = require('puppeteer-extra-plugin-stealth');
puppeteer.use(StealthPlugin());
(async () => {
const browser = await puppeteer.launch({args: ['--no-sandbox', '--disable-setuid-sandbox']});
const page = await browser.newPage();
await page.goto('https://leboncoin.fr');
@LeoMartinDev
LeoMartinDev / index.js
Created January 13, 2020 21:24
puppeteer basic example
const puppeteer = require('puppeteer');
(async () => {
const browser = await puppeteer.launch({ headless: true });
const page = await browser.newPage();
await page.goto('https://leboncoin.fr');
await page.screenshot({ path: 'leboncoin.png' });
await browser.close();
})();
@LeoMartinDev
LeoMartinDev / web-audio-fetch-stream.js
Created August 13, 2018 19:00 — forked from revolunet/web-audio-fetch-stream.js
Web Audio streaming with fetch API
//
// loads remote file using fetch() streams and "pipe" it to webaudio API
// remote file must have CORS enabled if on another domain
//
// mostly from http://stackoverflow.com/questions/20475982/choppy-inaudible-playback-with-chunked-audio-through-web-audio-api
//
function play(url) {
var context = new (window.AudioContext || window.webkitAudioContext)();
@LeoMartinDev
LeoMartinDev / How_to_use.html
Created October 16, 2016 22:58 — forked from jcgregorio/How_to_use.html
HTML Templating using the HTML <template> element and exactly 100 lines of JS. A cleaned up version of this code is now available at https://github.com/jcgregorio/stamp/.
<!DOCTYPE html>
<html>
<head>
<title></title>
<meta charset="utf-8" />
<script src="templating.js" type="text/javascript" charset="utf-8"></script>
</head>
<body>
<template id=t>
@LeoMartinDev
LeoMartinDev / Responsive Vertical Alignment
Created September 11, 2016 16:39 — forked from nathanieldeal/Responsive Vertical Alignment
Vertically align anything responsive in any size with CSS
.parent {
height: 100%;
position: relative;
}
.parent .element {
top:50%;
-webkit-transform:translateY(-50%);
-moz-transform:translateY(-50%);
-ms-transform:translateY(-50%);
/**
* Auto-generated code below aims at helping you parse
* the standard input according to the problem statement.
* ---
* Hint: You can use the debug stream to print initialTX and initialTY, if Thor seems not follow your orders.
**/
var inputs = readline().split(' ');
var lightX = parseInt(inputs[0]); // the X position of the light of power
var lightY = parseInt(inputs[1]); // the Y position of the light of power
@LeoMartinDev
LeoMartinDev / GoogleHackMasterList.txt
Created April 11, 2016 12:54 — forked from cmartinbaughman/GoogleHackMasterList.txt
The definitive super list for "Google Hacking".
admin account info" filetype:log
!Host=*.* intext:enc_UserPassword=* ext:pcf
"# -FrontPage-" ext:pwd inurl:(service | authors | administrators | users) "# -FrontPage-" inurl:service.pwd
"AutoCreate=TRUE password=*"
"http://*:*@www&#8221; domainname
"index of/" "ws_ftp.ini" "parent directory"
"liveice configuration file" ext:cfg -site:sourceforge.net
"parent directory" +proftpdpasswd
Duclassified" -site:duware.com "DUware All Rights reserved"
duclassmate" -site:duware.com