Skip to content

Instantly share code, notes, and snippets.

@getaaron
getaaron / irs-get-human.md
Created April 1, 2024 23:01
Get a person at the IRS
  • Call 1-800-829-1040
  • Press 1 for English (or other language as desired)
  • Press 2 for personal tax
  • Press 1 for form / tax history
  • Press 3 for other
  • Press 2 for other
  • Ignore 2 SSN prompts till you get secret other menu
  • Press 2 for personal tax
  • Press 3 for other
  • Wait for agent!
@ryanmortier
ryanmortier / wsl_development_environment.md
Last active July 13, 2022 11:10
WSL Development Environment

WSL Development Environment

Windows

Source: https://docs.microsoft.com/en-us/windows/wsl/install-win10

  1. Elevated PowerShell: wsl --install
  2. Reboot computer when prompted.
  3. Setup will continue automatically and install Ubuntu.
  4. Setup a user and password for Ubuntu when prompted.
  5. Install Microsoft Terminal, configure fonts and theme.
  6. Install Visual Studio Code, configure settings, keybinds, theme, and extensions.
@fideloper
fideloper / stream_file.php
Last active November 8, 2024 09:51
Stream file from S3 to browser, assume Laravel Filesystem usage
<?php
/*************************************************************************
* Get File Information
*/
// Assuming these come from some data source in your app
$s3FileKey = 's3/key/path/to/file.ext';
$fileName = 'file.ext';
@tillkruss
tillkruss / stream-s3-as-zip.php
Last active April 6, 2020 08:28
Stream files from S3 as ZIP file.
<?php
use Aws\S3\S3Client;
use ZipStream\ZipStream; // https://github.com/maennchen/ZipStream-PHP
use GuzzleHttp\Client as HttpClient;
protected function streamAsZip($files)
{
$s3 = S3Client::factory('...');
$zip = new ZipStream("foobar.zip");
@hacfi
hacfi / disable-xdebug.sh
Created February 5, 2016 00:53
OS X homebrew php 7.0 enable/disable xdebug extension script
#!/bin/sh
sed -i.default "s/^zend_extension=/;zend_extension=/" /usr/local/etc/php/7.0/conf.d/ext-xdebug.ini
launchctl unload ~/Library/LaunchAgents/homebrew.mxcl.php70.plist
launchctl load ~/Library/LaunchAgents/homebrew.mxcl.php70.plist
echo "xdebug disabled"
@scottmagdalein
scottmagdalein / clickable-element.html
Last active March 15, 2023 18:01
Make the Mailchimp Subscriber popup appear on click
<!-- This is the HTML element that, when clicked, will cause the popup to appear. -->
<button id="open-popup">Subscribe to our mailing list</button>
<?php
// (string) $message - message to be passed to Slack
// (string) $room - room in which to write the message, too
// (string) $icon - You can set up custom emoji icons to use with each message
public static function slack($message, $room = "engineering", $icon = ":longbox:") {
$room = ($room) ? $room : "engineering";
$data = json_encode(array(
"channel" => "#{$room}",
"text" => $message,
@nadar
nadar / PostMessageToSlackChannel.php
Last active June 5, 2024 17:05
Post a message to a slack channel with PHP
<?php
/**
* Send a Message to a Slack Channel.
*
* In order to get the API Token visit:
*
* 1.) Create an APP -> https://api.slack.com/apps/
* 2.) See menu entry "Install App"
* 3.) Use the "Bot User OAuth Token"
@fideloper
fideloper / nginx.conf
Last active February 15, 2017 22:09
Nginx redirects
server {
# ...
# Redirect /book and any sub-uris
# e.g. /book/anything
# e.v. /book/whatever?maybe=a_query_too
location /book {
return 301 http://book.serversforhackers.com;
}
@adamwathan
adamwathan / v-cloak.md
Last active November 6, 2024 14:28
Useful CSS utilities for Vue.js cloaking

Handy helpers for controlling visibility of elements until Vue has compiled.

Use like:

<div v-cloak>
  <h1>
    <span class="v-cloak--inline">Loading...</span> <!-- Only displayed before compiling -->
    <span class="v-cloak--hidden">{{ post.title }}</span> <!-- Hidden until compiling is finished -->