Skip to content

Instantly share code, notes, and snippets.

@outadoc
outadoc / Keolis-API.md
Last active April 20, 2024 15:04
Keolis Real-time API

Keolis "open-data" : XML Realtime API

Les données retournées sont au format XML.

Document trouvé et modifié depuis Pastebin.

Récupérer la liste des lignes

@bashbunni
bashbunni / .zshrc
Created October 27, 2022 21:41
CLI Pomodoro for Mac
# I'll be doing another one for Linux, but this one will give you
# a pop up notification and sound alert (using the built-in sounds for macOS)
# Requires https://github.com/caarlos0/timer to be installed
# Mac setup for pomo
alias work="timer 60m && terminal-notifier -message 'Pomodoro'\
-title 'Work Timer is up! Take a Break 😊'\
-appIcon '~/Pictures/pumpkin.png'\
-sound Crystal"
@gemmadlou
gemmadlou / remove-visual-composer-shortcodes.md
Last active April 20, 2024 14:56
Removing Visual Composer & Shortcodes From Wordpress Content

Adding @k1sul1's suggestion from the comments as it's more concise than what I had before:

I just wanted them all gone, so I ran this in the MySQL shell.

UPDATE wp_posts SET post_content = REGEXP_REPLACE(post_content, "\\[\/?vc(.*?)\]", "");

Note the double backslash. If you forget it, you'll replace all v's and c's with nothing, and the shortcodes will still be there. This works for other shortcode as well, just replace vc.

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Simple HTML5 Game</title>
<style>
body {
margin: 0;
padding: 0;
@ihoneymon
ihoneymon / how-to-write-by-markdown.md
Last active April 20, 2024 14:51
마크다운(Markdown) 사용법

[공통] 마크다운 markdown 작성법

영어지만, 조금 더 상세하게 마크다운 사용법을 안내하고 있는
"Markdown Guide (https://www.markdownguide.org/)" 를 보시는 것을 추천합니다. ^^

아, 그리고 마크다운만으로 표현이 부족하다고 느끼신다면, HTML 태그를 활용하시는 것도 좋습니다.

1. 마크다운에 관하여

@noone2k
noone2k / bc2500-ble-idf.yaml
Last active April 20, 2024 14:50
bc2500 info/control with esphome
esphome:
name: bc2500-ble-idf
friendly_name: bc2500-ble-idf
esp32:
board: az-delivery-devkit-v4
framework:
type: esp-idf
sdkconfig_options:
CONFIG_FREERTOS_UNICORE: y
@j4w8n
j4w8n / implement-user-api-keys-with-supabase.md
Last active April 20, 2024 14:48
Implement user API keys with Supabase

Implement user API keys with Supabase

Rationale

JWTs are at the heart of Supabase authorization, but sometimes we wanna build an app that also gives users access via API keys; or perhaps only exclusively via API keys. As you may know, using JWTs as API keys makes them difficult to revoke and therefore a security issue.

We also want to ensure this doesn't significantly add to RLS polices, if at all.

Finally, we'd love to have this handled by Supabase and do as little as possible in our framework. This simplifies our code and reduces third-party libraries.

Solution

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Simple HTML5 Game</title>
<style>
body {
margin: 0;
padding: 0;
#!/usr/bin/env bash
#
# Mastodon update script
# v3 (2024.02.18)
#
# Changelog
# * v1 - initial version
# * v2 - added mastodon-bird-ui
# * v3 - added import of temporary email domains
@shellcromancer
shellcromancer / alg_crypto_rc4.yara
Created January 4, 2022 04:12
Identify code for the RC4 cryptographic algorithm.
rule alg_crypto_rc4 {
meta:
descrption = "Identify code for the (A)RC4 cryptographic algorithm."
author = "@shellcromancer <root@shellcromancer.io>"
version = "0.1"
date = "2022-01-03"
reference = "https://www.goggleheadedhacker.com/blog/post/reversing-crypto-functions#identifying-rc4-in-assembly"
reference = "https://0xc0decafe.com/detect-rc4-encryption-in-malicious-binaries/"
reference = "https://blog.talosintelligence.com/2014/06/an-introduction-to-recognizing-and.html"
strings: