Skip to content

Instantly share code, notes, and snippets.

View dheerapat's full-sized avatar

dheerapat dheerapat

  • Faculty of Pharmaceutical Science, Khon Kaen University
  • Khon Kaen, Thailand
View GitHub Profile
enum WarehouseLocationERP {
Thaphra = 'WH02',
Thairath = 'WH03',
Province = 'WH90',
MachineInventory = 'WH25'
}
enum VirtualWarehouseERP {
ReadyToUseWarehouse = '02',
Machine = '03',
@dheerapat
dheerapat / re-test.py
Last active October 5, 2024 17:49
python regex example
import re
txt = """<|python_tag|><function=spotify_song_artist>{"n": "[\"BIRDS OF A FEATHER\", \"Espresso\", \"Please Please Please\", \"Not Like Us\", \"Gata Only\"]"}</function>"""
x = re.search("<function=(\w+)>(.*?)</function>", txt)
if x:
print("YES! We have a match!")
print(x.group())
else:
print("No match")
@dheerapat
dheerapat / .bashrc
Last active July 29, 2024 11:23
personal .bashrc alias and env
# shorten path at prompt to only 1 level above current file
export PROMPT_DIRTRIM=1
# start and stop docker-destop (in case clicking icon not working)
alias docker-desktop-start='systemctl --user start docker-desktop'
alias docker-desktop-stop='systemctl --user stop docker-desktop'