Skip to content

Instantly share code, notes, and snippets.

View adrianmarian's full-sized avatar
💭
I may be slow to respond.

Adrian Gadescu adrianmarian

💭
I may be slow to respond.
View GitHub Profile
@adrianmarian
adrianmarian / postfix.php
Created November 5, 2018 14:13 — forked from jaysonrowe/postfix.php
Parse e-mail with PHP
#!/usr/bin/php -q
<?php
// get mail via stdin
$email = file_get_contents("php://stdin");
// handle email
$lines = explode("\n", $email);
// set empty vars and explode message to variables
@egyjs
egyjs / Direct Link of YouTube videos.md
Last active November 11, 2024 10:13
PHP API To get Direct Link of YouTube videos
router.post('/new', function(req, res, next) {
res.locals.connection.query('insert into members(name,email) values(''+req.body.name+'',''+req.body.email+'')', function (error, results, fields) {
if(error) throw error;
res.send(JSON.stringify(results));
});
});
@jessfraz
jessfraz / boxstarter.ps1
Last active March 4, 2025 09:17
Boxstarter Commands for a new Windows box.
# Description: Boxstarter Script
# Author: Jess Frazelle <[email protected]>
# Last Updated: 2017-09-11
#
# Install boxstarter:
# . { iwr -useb http://boxstarter.org/bootstrapper.ps1 } | iex; get-boxstarter -Force
#
# You might need to set: Set-ExecutionPolicy RemoteSigned
#
# Run this boxstarter by calling the following from an **elevated** command-prompt:
@richardszalay
richardszalay / Reset-BashPassword.ps1
Last active December 3, 2020 08:38
Reset-BashPassword.ps1
# Resets the password for the default LXSS / WSL bash user, based on https://askubuntu.com/a/808425/697555
$lxssUsername = (Get-ItemProperty HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Lxss).DefaultUsername
lxrun /setdefaultuser root
bash -c "passwd $lxssUsername"
lxrun /setdefaultuser $lxssUsername
@jgravois
jgravois / links.md
Last active January 15, 2018 05:43
tucson hackerlab (4/13/2017) http://bit.ly/2orLbbq
@elidickinson
elidickinson / max_width_email.html
Created May 6, 2013 15:10
Email Template trick: max-width with outlook
<!--[if mso]>
<center>
<table><tr><td width="580">
<![endif]-->
<div style="max-width:580px; margin:0 auto;">
<p>This text will be centered and constrained to 580 pixels even on Outlook which does not support max-width CSS</p>
</div>
<!--[if mso]>
@gabesumner
gabesumner / fiddle.css
Last active November 19, 2023 06:01
Address Validation using the Google Maps API
body {
font: 12px verdana;
background-color: #5C87B2;
}
form {
max-width: 400px;
padding: 15px;
background-color: white;
}