Skip to content

Instantly share code, notes, and snippets.

@AnandChowdhary
AnandChowdhary / generate-changelog.ts
Last active July 18, 2025 10:11
Changelog automation
import slugify from "@sindresorhus/slugify";
import { execSync } from "child_process";
import dotenv from "dotenv";
import fs from "fs";
import { DateTime } from "luxon";
import { OpenAI } from "openai";
import path from "path";
import prettier from "prettier";
import { env } from "process";
@hackermondev
hackermondev / zendesk.md
Last active November 25, 2025 00:09
1 bug, $50,000+ in bounties, how Zendesk intentionally left a backdoor in hundreds of Fortune 500 companies

hi, i'm daniel. i'm a 15-year-old with some programming experience and i do a little bug hunting in my free time. here's the insane story of how I found a single bug that affected over half of all Fortune 500 companies:

say hello to zendesk

If you've spent some time online, you’ve probably come across Zendesk.

Zendesk is a customer service tool used by some of the world’s top companies. It’s easy to set up: you link it to your company’s support email (like support@company.com), and Zendesk starts managing incoming emails and creating tickets. You can handle these tickets yourself or have a support team do it for you. Zendesk is a billion-dollar company, trusted by big names like Cloudflare.

Personally, I’ve always found it surprising that these massive companies, worth billions, rely on third-party tools like Zendesk instead of building their own in-house ticketing systems.

your weakest link

@mcrumm
mcrumm / component_under_test.ex
Last active December 4, 2025 16:59
Testing Phoenix.LiveComponent in Isolation
# lib/party_web/components/example_component.ex
defmodule PartyWeb.ExampleComponent do
@moduledoc """
An example LiveComponent under test.
"""
use Phoenix.LiveComponent
def render(assigns) do
~H"""
<div>
@bzerangue
bzerangue / json-to-ndjson.md
Last active April 17, 2025 12:09
JSON to NDJSON

NDJSON is a convenient format for storing or streaming structured data that may be processed one record at a time.

  • Each line is a valid JSON value
  • Line separator is ‘\n’

1. Convert JSON to NDJSON?

cat test.json | jq -c '.[]' > testNDJSON.json
@alexkrauss
alexkrauss / gitlab-timeline.html
Created August 16, 2018 07:17
Timeline charts for Gitlab build jobs
<html>
<head>
<script type="text/javascript" src="https://www.gstatic.com/charts/loader.js"></script>
<script type="text/javascript">
// This is a quick hack to be able to see Gantt-like Timelines of gitlab build pipelines.
// It makes it easier to diagnose the running time of the pipelines and understand resource usage.
// Ideally, gitlab would directly provide such a view in its frontend.
google.charts.load('current', {'packages':['gantt']});
@mostafa-asg
mostafa-asg / Css styles
Last active August 27, 2022 21:05
centering images in Hugo - Based on this article : (http://www.ebadf.net/2016/10/19/centering-images-in-hugo/)
img[src$='#center']
{
display: block;
margin: 0.7rem auto; /* you can replace the vertical '0.7rem' by
whatever floats your boat, but keep the
horizontal 'auto' for this to work */
/* whatever else styles you fancy here */
}
img[src$='#floatleft']
@ZackStone
ZackStone / slack-invite-all-members-to-a-channel.js
Created April 14, 2017 13:48
Invite all team members to a Slack channel
/*
https://webapps.stackexchange.com/questions/100820/how-do-i-invite-all-team-members-to-a-new-slack-channel#answer-104062
Instructions: Just browse to the appropriate channel and paste
this script (below) into your Chrome/Firefox dev console and hit enter.
Then wait for the script to run until it completes.
It might take time as there is a limit to how many users may be invited at once.
The script will loop until all team members are invited.
*/
var foundAny=false;
function selectAllByLetter(remainingLetters) {
@mfrister
mfrister / raml-api-console-for-development.md
Last active November 11, 2015 10:36
RAML API Console for Development

Installation

npm install -g http-server

API Console unfortunately is not available on NPM. See its README for installation instructions.

You might have to run grunt after installation. Grunt opens a web page, just close it.

Run:

@mfrister
mfrister / ruby-flamegraphs.md
Last active August 31, 2015 06:54
Ruby Flamegraphs

ruby-prof Flamegraphs

ruby-prof

require 'ruby-prof'
require 'ruby-prof-flamegraph'
result = RubyProf.profile do

 # code to profile
@opahk
opahk / gist:a2f6f469b11230059315
Created August 21, 2014 12:47
ruby/js testing tools
base
* simplecov
* rspec
* capybara
quality
* checker
* rails_best_practices
* jslint
* coffeelint