Skip to content

Instantly share code, notes, and snippets.

View EdwardNavarro's full-sized avatar
🎯
Focusing

Edward Navarro EdwardNavarro

🎯
Focusing
View GitHub Profile
@sanjeevsiva17
sanjeevsiva17 / printToPrinter.py
Created May 4, 2021 10:55
Create and send zpl file to printer
import os, sys
import subprocess
def printToPrnter(name, city):
data = "^XA" \
"^FO200,30^ADN,30,20^FB400,3,0,C^FD"+name+"^FS" \
"^FO200,80^ADN,30,20^FB400,3,0,C^FD"+city+"^FS" \
"^XZ"
try:
@sanjeevsiva17
sanjeevsiva17 / server.py
Last active December 29, 2022 03:13
Python server for zpl
from flask import Flask, request, jsonify
import json
from printToPrinter import printToPrnter
import textwrap
app = Flask(__name__)
@app.route('/')
import React from 'react'
const CountDownTimer = ({hoursMinSecs}) => {
const { hours = 0, minutes = 0, seconds = 60 } = hoursMinSecs;
const [[hrs, mins, secs], setTime] = React.useState([hours, minutes, seconds]);
const tick = () => {
@aleclarson
aleclarson / rollup-typescript.md
Last active April 7, 2024 14:13
The best Rollup config for TypeScript libraries

Features

🔥 Blazing fast builds
😇 CommonJS bundle
🌲 .mjs bundle
.d.ts bundle + type-checking
🧐 Source maps

Install

@straker
straker / README.md
Last active April 16, 2024 08:49
Basic Tetris HTML and JavaScript Game

Basic Tetris HTML and JavaScript Game

This is a basic implementation of the game Tetris, but it's missing a few things intentionally and they're left as further exploration for the reader.

Further Exploration

@ragingwind
ragingwind / nginx.conf
Created August 5, 2019 09:19
Redirect old-classic browser including IE 11
worker_processes 1;
events {
worker_connections 1024;
}
http {
map $http_user_agent $outdated {
default 0;
"~MSIE [1-10]\." 1;
@11philip22
11philip22 / app.js
Last active December 23, 2023 19:11
Crack Monokai pro theme for Visual Studio Code or VSCodium
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("path"),require("child_process"),require("os"),require("fs")):"function"==typeof define&&define.amd?define(["path","child_process","os","fs"],t):"object"==typeof exports?exports["app"]=t(require("path"),require("child_process"),require("os"),require("fs")):e["app"]=t(e["path"],e["child_process"],e["os"],e["fs"])}(this,function(e,t,s,i){return(e=>{function t(i){if(s[i])return s[i].exports;var r=s[i]={i,l:!1,exports:{}};return e[i].call(r.exports,r,r.exports,t),r.l=!0,r.exports}var s={};return t.m=e,t.c=s,t.d=((e,s,i)=>{t.o(e,s)||Object.defineProperty(e,s,{configurable:!1,enumerable:!0,get:i})}),t.n=(e=>{var s=e&&e.__esModule?function(){return e["default"]}:function(){return e};return t.d(s,"a",s),s}),t.o=((e,t)=>Object.prototype.hasOwnProperty.call(e,t)),t.p="",t(t.s=1)})([(e,t,s)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default={APP:{NAME:"MonokaiPro-VSCode",
THEMES:["Monokai Pro","Monokai Pro (F
@lucasmezencio
lucasmezencio / SLUG.md
Last active April 24, 2024 14:01
Creating URL slugs properly in PHP (including transliteration for UTF-8)

Creating URL slugs properly in PHP (including transliteration for UTF-8)

The point to use a slug (semantic URL) besides of improve the SEO of your articles is to prevent that the user, at the creation of for example an article, it uses special characters that aren't allowed in a URL, appropiate the usage etc. What target usage means, is context dependent.

In this article, you'll learn how to slugify a string in PHP properly, including (or not) support (conversion) for cyrilic and special latin characters.

Slugify in PHP

The following function exposes a simple way to convert text into a valid slug:

@MrChocolatine
MrChocolatine / macOS – Remove metadata from PDF files.md
Last active April 5, 2024 16:09
macOS – Remove metadata from PDF files
@zubayerahamed
zubayerahamed / zpl_command.md
Created August 24, 2018 13:11
How to print ZPL file using terminal on linux

to see which printer is availabe in this system , simply type

lpstat -p -d

Output: printer HP-LaserJet-1200 is idle. enabled since Thu 09 Aug 2018 01:29:05 PM +06 printer Zebra-Technologies-ZTC-GK420t is idle. enabled since Fri 24 Aug 2018 05:54:04 PM +06 printer ZTC-GK420t is idle. enabled since Fri 24 Aug 2018 05:54:04 PM +06 system default destination: Zebra-Technologies-ZTC-GK420t