Skip to content

Instantly share code, notes, and snippets.

@IMS94
IMS94 / stackoverflow_to_gchat.bal
Created April 21, 2022 06:29
A Ballerina program to get latest Ballerina tagged stackoverflow questions as notifications to the google chat
import ballerina/http;
import ballerina/time;
import ballerina/log;
configurable string chatId = ?;
configurable string chatKey = ?;
configurable string chatToken = ?;
// How often will this program be executed
configurable int intervalSeconds = 60 * 10;
Other 1 hr 2 mins ████████▊░░░░░░░░░░░░ 42.1%
JavaScript 38 mins █████▍░░░░░░░░░░░░░░░ 26.1%
HTML 29 mins ████▏░░░░░░░░░░░░░░░░ 19.7%
conf 6 mins ▉░░░░░░░░░░░░░░░░░░░░ 4.5%
C++ 6 mins ▉░░░░░░░░░░░░░░░░░░░░ 4.4%
@klange
klange / _.md
Last active June 7, 2024 20:17
12 Years of ToaruOS

12 Years of ToaruOS

This is a repost and update to an imgur album with screenshots of ToaruOS throughout its development, as imgur is no longer a viable platform for maintaining this collection.

Early Development

My first commit in the ToaruOS repository, ecd4fe2bc170b01ad700ff76c16da96993805355, was made on January 15th, 2011. This date has become ToaruOS's "birthday". It would be another six years and two weeks before ToaruOS's first real release, 1.0.

1 - eL4aHBZ - Humble Beginnings

gist is a good tool for code cheat
@SwitHak
SwitHak / 20211210-TLP-WHITE_LOG4J.md
Last active June 14, 2024 00:16
BlueTeam CheatSheet * Log4Shell* | Last updated: 2021-12-20 2238 UTC

Security Advisories / Bulletins / vendors Responses linked to Log4Shell (CVE-2021-44228)

Errors, typos, something to say ?

  • If you want to add a link, comment or send it to me
  • Feel free to report any mistake directly below in the comment or in DM on Twitter @SwitHak

Other great resources

  • Royce Williams list sorted by vendors responses Royce List
  • Very detailed list NCSC-NL
  • The list maintained by U.S. Cybersecurity and Infrastructure Security Agency: CISA List
@dariocurr
dariocurr / .zshrc
Last active May 16, 2024 08:37
My .zshrc configuration file for zsh using antigen
# load color parsing
setopt PROMPT_SUBST
autoload -U colors
# load antigen
source $HOME/.antigen/antigen.zsh
# load the oh-my-zsh's library
antigen use oh-my-zsh
@genesem
genesem / firebase-messaging-sw.js
Created November 23, 2021 14:34 — forked from loicginoux/firebase-messaging-sw.js
Adding FCM to an html page to receive notifications and sending then via FCM ruby gem. (edit: HTTPS needed!)
// [START initialize_firebase_in_sw]
// Give the service worker access to Firebase Messaging.
// Note that you can only use Firebase Messaging here, other Firebase libraries
// are not available in the service worker.
importScripts('https://www.gstatic.com/firebasejs/3.5.2/firebase-app.js');
importScripts('https://www.gstatic.com/firebasejs/3.5.2/firebase-messaging.js');
// Initialize the Firebase app in the service worker by passing in the
// messagingSenderId.
firebase.initializeApp({
🌞 Morning 0 commits ░░░░░░░░░░░░░░░░░░░░░ 0.0%
🌆 Daytime 0 commits ░░░░░░░░░░░░░░░░░░░░░ 0.0%
🌃 Evening 28 commits █████████████████████ 100.0%
🌙 Night 0 commits ░░░░░░░░░░░░░░░░░░░░░ 0.0%
@ivan
ivan / cargo.sh
Last active September 29, 2023 04:35
cargo wrapper for NixOS and Rust nightly: mold, target-cpu, -Z share-generics
#!/usr/bin/env bash
# NixOS-only cargo wrapper that:
# - always uses mold for linking.
# - sets `-C target-cpu=haswell` to avoid generating code for pre-2013 CPUs.
# - sets `-C link-arg=-Wl,--compress-debug-sections=zlib-gabi` to compress debug sections.
# - sets LIBCLANG_PATH for projects that need clang.
# - sets `-Z share-generics` to reduce output binary sizes by ~2MB.
# - turns on cargo's sparse-registry feature.
# - increases niceness slightly with `nice -n 2` .