Skip to content

Instantly share code, notes, and snippets.

@pawangjain
pawangjain / copy_dir.dart
Created April 16, 2021 13:09 — forked from thosakwe/copy_dir.dart
Recursively copy directory in Dart (requires "path")
/*
* I'm sure there's a better way to do this, but this solution works for me.
* Recursively copies a directory + subdirectories into a target directory.
* There's also no error handling. Have fun.
*/
import 'dart:io';
import 'package:path/path.dart' as path;
Future<void> copyDirectory(Directory source, Directory destination) async {
@pawangjain
pawangjain / YouTubeURLFormats.txt
Created November 3, 2020 05:54 — forked from rodrigoborgesdeoliveira/ActiveYouTubeURLFormats.txt
Example of the various YouTube url formats
http://www.youtube.com/watch?v=-wtIMTCHWuI
http://www.youtube.com/v/-wtIMTCHWuI?version=3&autohide=1
http://youtu.be/-wtIMTCHWuI
http://www.youtube.com/oembed?url=http%3A//www.youtube.com/watch?v%3D-wtIMTCHWuI&format=json
http://www.youtube.com/attribution_link?a=JdfC0C9V6ZI&u=%2Fwatch%3Fv%3DEhxJLojIE_o%26feature%3Dshare
@pawangjain
pawangjain / regexCheatsheet.js
Created August 10, 2019 13:30 — forked from sarthology/regexCheatsheet.js
A regex cheatsheet 👩🏻‍💻 (by Catherine)
let regex;
/* matching a specific string */
regex = /hello/; // looks for the string between the forward slashes (case-sensitive)... matches "hello", "hello123", "123hello123", "123hello"; doesn't match for "hell0", "Hello"
regex = /hello/i; // looks for the string between the forward slashes (case-insensitive)... matches "hello", "HelLo", "123HelLO"
regex = /hello/g; // looks for multiple occurrences of string between the forward slashes...
/* wildcards */
regex = /h.llo/; // the "." matches any one character other than a new line character... matches "hello", "hallo" but not "h\nllo"
regex = /h.*llo/; // the "*" matches any character(s) zero or more times... matches "hello", "heeeeeello", "hllo", "hwarwareallo"
{
"Schedule": [
{
"Date": "11 JUL 2019",
"Day": "THURSDAY",
"ScheduleDetailList": [
{
"SdDesc": "",
"SdLocation": "Lanier Grand Ballroom (4th Floor)",
"SdName": "Welcome Session - Pujyashree DADA-27",