Skip to content

Instantly share code, notes, and snippets.

View aissat's full-sized avatar
🎯
Focusing

Aye7 aissat

🎯
Focusing
View GitHub Profile
@spiritinlife
spiritinlife / easy_localization_keys_extractor.dart
Last active January 20, 2022 11:09
Extract language keys from your source code and merge them into existing translations.
/// This is inspired by intl_translation extract command https://github.com/dart-lang/intl_translation/blob/8a5e883d7fe07b0244adbaf3489ceb3b08385483/bin/extract_to_arb.dart
/// and is a slimed down rough version of it. Most of the code is from this package which is an excellent learning resource for anyone who wants
/// to play around with the dart analyzer.
/// This is a rough script, to extract localization keys for the easy_localization library. It will analyze the souce
/// code and find occurrences of tr and plural ( you could add other method names e.g. gender etc ) and extract the argument at index $argumentIndex
/// which should be the translation key. It then merges those keys to your current translated keys and spits the merged version where the
/// untranslated keys have a value of "MISSING".
/// Known issues
/// tr( isSomething ? "true_key" : "false_key", context ) -> will get this as key isSomething ? "true_key" : "false_key"
@LnL7
LnL7 / default.nix
Last active July 31, 2017 11:12
nix golang project exmaple
{ pkgs ? import <nixpkgs> {} }:
let
inherit (pkgs) stdenv buildEnv;
goPackages = buildEnv {
name = "go-packages";
paths =
[ # Dependencies...
];
@barbietunnie
barbietunnie / udemy-courses-download-using-cookies.md
Last active July 18, 2024 12:14
Downloading Udemy videos with youtube-dl

How to download your Udemy course videos using youtube-dl

$ youtube-dl --list-extractors | grep udemy

Steps

  1. Get link to the course to download. e.g. https://www.udemy.com/course-name/
  2. Login into udemy website, save the cookie from chrome using Chrome (Cookie.txt)[1] export extension. Save it to file udemy-cookies.txt
  3. Get the link of the video that you want to download. usually in format. Use the command provided below where you have to replace the {course_link} and {path_to_cookies_file} with respective paths.
$ youtube-dl {course_link} --cookies {path_to_cookies_file}
@datakurre
datakurre / app.py
Last active July 24, 2017 20:12
Python package development shell example in Nix
from latex import build_pdf
min_latex = (r"\documentclass{article}"
r"\begin{document}"
r"Hello, world!"
r"\end{document}")
# this builds a pdf-file inside a temporary directory
pdf = build_pdf(min_latex)