Skip to content

Instantly share code, notes, and snippets.

@amlang
amlang / find json key value pair regex
Last active May 6, 2024 20:10
Regex find key and value pair in JSON formated string
# PHP / Ruby
# Regex find key and value pair in JSON formated string
# Match 1: Key
# Match 2: Value
# https://regex101.com/r/zR2vU9/4
# http://rubular.com/r/KpF3suIL10
# http://stackoverflow.com/questions/14349889/how-to-use-a-regular-expression-to-extract-json-fields/35129815#35129815
(?:\"|\')(?<key>[^"]*)(?:\"|\')(?=:)(?:\:\s*)(?:\"|\')?(?<value>true|false|[0-9a-zA-Z\+\-\,\.\$]*)
@cagartner
cagartner / deploy.sh
Last active May 6, 2024 20:09
Laravel Push deploy Github actions example
#!/bin/sh
set -e
vendor/bin/phpunit
(git push) || true
git checkout production
git merge master
@VoidFox
VoidFox / del-UWTSettings.reg
Created May 16, 2020 23:51
Fix for dead "UWTSettings" link in context menu thanks to "Ultimate Windows Tweaker 4 for Windows 10"/"FixWin"
Windows Registry Editor Version 5.00
[-HKEY_CLASSES_ROOT\DesktopBackground\Shell\UWTSettings]
@vitorbritto
vitorbritto / rm_mysql.md
Last active May 6, 2024 20:07
Remove MySQL completely from Mac OSX

Remove MySQL completely

  1. Open the Terminal

  2. Use mysqldump to backup your databases

  3. Check for MySQL processes with: ps -ax | grep mysql

  4. Stop and kill any MySQL processes

  5. Analyze MySQL on HomeBrew:

    brew remove mysql
    
@maxspero
maxspero / wordle_variants.md
Last active May 6, 2024 20:06
Comprehensive list of Wordle variants

Original

  • Wordle - Guess a five-letter word in six guesses. Each guess must be real words.

Clones

Multiplayer

@timvisee
timvisee / falsehoods-programming-time-list.md
Last active May 6, 2024 20:05
Falsehoods programmers believe about time, in a single list

Falsehoods programmers believe about time

This is a compiled list of falsehoods programmers tend to believe about working with time.

Don't re-invent a date time library yourself. If you think you understand everything about time, you're probably doing it wrong.

Falsehoods

  • There are always 24 hours in a day.
  • February is always 28 days long.
  • Any 24-hour period will always begin and end in the same day (or week, or month).
@gurbain
gurbain / move_square.py
Created October 15, 2018 13:16
This script allows to move and draw a square on the ground with the turtlebot in three different ways
import math
import rospy as ros
import sys
import time
from geometry_msgs.msg import Twist, Pose
from nav_msgs.msg import Odometry
from tf.transformations import euler_from_quaternion, quaternion_from_euler
@MikePandel
MikePandel / Python - Hangman [GUI]
Created February 23, 2020 17:20
Python - Hangman [GUI]
#!/usr/bin/env python3
import string
import os # Used for clearing the term window
import time # Used for 5 second buffer at the end of the game
import random # To pick random word from list
from tkinter import * # GUI
import tkinter as tk # GUI
from tkinter import messagebox # GUI Message Box
'''
@stuartsaunders
stuartsaunders / workflow.md
Created June 22, 2010 05:07 — forked from zaach/workflow.md
Versioning and Git Workflow

Semantic Versioning

Details:

Versions are denoted using a standard triplet of integers: MAJOR.MINOR.PATCH. The basic intent is that MAJOR versions are incompatible, large-scale upgrades of the API. MINOR versions retain source and binary compatibility with older minor versions, and changes in the PATCH level are perfectly compatible, forwards and backwards.