Skip to content

Instantly share code, notes, and snippets.

View DearRude's full-sized avatar
😴
tired

Ebrahim DearRude

😴
tired
View GitHub Profile
@mehranz
mehranz / grafana-loki-docker-compose.yaml
Last active March 1, 2021 18:28
docker compose to run grafana + loki.
version: "3"
networks:
loki:
services:
loki:
image: grafana/loki:2.0.0
ports:
- "3100:3100"
command: -config.file=/etc/loki/local-config.yaml
@ArefMozafari
ArefMozafari / DartGist2.dart
Last active August 5, 2021 17:11
Flutter/Dart - How to convert En/Fa entered number to each other
extension StringExtentions on String {
String replaceFaNumToEnNum() {
const english = ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9'];
const farsi = ['۰', '۱', '۲', '۳', '۴', '۵', '۶', '۷', '۸', '۹'];
String value = this;
for (int i = 0; i < farsi.length; i++) {
value = value.replaceAll(farsi[i], english[i]);
}
@ynakao
ynakao / init.el
Last active January 14, 2023 07:36
Circe to znc example
(use-package circe
:config
(setq circe-network-options
(quote
(("freenode-znc"
:host "znc.example.com"
:use-tls t
:port 6697
:user "zncusername/zncfreenode" ;; `zncfreenode` is freenode network name at your znc server
:pass "zncpassword")
// XPath CheatSheet
// To test XPath in your Chrome Debugger: $x('/html/body')
// http://www.jittuu.com/2012/2/14/Testing-XPath-In-Chrome/
// 0. XPath Examples.
// More: http://xpath.alephzarro.com/content/cheatsheet.html
'//hr[@class="edge" and position()=1]' // every first hr of 'edge' class