Skip to content

Instantly share code, notes, and snippets.

View lokeshpahal's full-sized avatar
🏠
Working from home

Lokesh Pahal lokeshpahal

🏠
Working from home
  • Code Genesys
  • Delhi
View GitHub Profile
import 'dart:collection';
import 'package:flutter/material.dart';
import 'package:abc/ui/appbar/common.dart';
import 'package:abc/ui/pages/stem/sticky.dart';
import 'package:abc/ui/widgets/custom.dart';
class Item {
final String id;
String listId;
final String title;
@lokeshpahal
lokeshpahal / docker-for-mac.md
Created December 16, 2022 16:34 — forked from BretFisher/docker-for-mac.md
Getting a Shell in the Docker Desktop Mac VM

2021 Update: Easiest option is Justin's repo and image

Just run this from your Mac terminal and it'll drop you in a container with full permissions on the Docker VM. This also works for Docker for Windows for getting in Moby Linux VM (doesn't work for Windows Containers).

docker run -it --rm --privileged --pid=host justincormack/nsenter1

more info: https://github.com/justincormack/nsenter1


@lokeshpahal
lokeshpahal / index.html
Created November 16, 2022 14:13 — forked from jdarling/index.html
Reuseable D3 MindMap (left/right tree)
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8"/>
<script type="text/javascript" src="http://d3js.org/d3.v3.min.js"></script>
<style type="text/css">
.node circle {
cursor: pointer;
fill: #fff;
stroke: steelblue;
@lokeshpahal
lokeshpahal / encoding-video.md
Created August 31, 2021 05:30 — forked from glen-cheney/encoding-video.md
Encoding video for the web

Encoding Video

Installing

Install FFmpeg with homebrew. You'll need to install it with a couple flags for webm and the AAC audio codec.

brew install ffmpeg --with-libvpx --with-libvorbis --with-fdk-aac --with-opus
@lokeshpahal
lokeshpahal / Email Server (Linux, Unix, Mac).md
Created May 6, 2020 06:33 — forked from raelgc/Email Server (Linux, Unix, Mac).md
Setup a Local Only SMTP Email Server (Linux, Unix, Mac)

Setup a Local Only SMTP Email Server (Linux, Unix, Mac)

1 - Point localhost.com to your machine

Most of programs will not accept an email using just @localhost as domain. So, edit /etc/hosts file to make the domain localhost.com point to your machine, including this content to the file:

127.0.0.1 localhost.com

2 - Install Postfix

@lokeshpahal
lokeshpahal / unlimited_trials_babeledit.txt
Created February 20, 2020 14:08
Activate BabelEdit temporarily / Unlimited trial
Obviously for educative purposes only.
Furthermore, this DOESN'T activate BabelEdit permanently.
If you like the software, buy it, the devs deserve it.
Since I have no money to buy it, I discovered a workaround for unlimited trials.
It's quite a annoying workaround, but ... it works!
Firstly go to "c:\windows\system32\drivers\etc\" and open the "hosts" file in Notepad/Notepad++/VSCode/Sublime/Atom/whatever as admin (if you don't open it as admin, it won't let you save it).
Add this line at the end of the file:
@lokeshpahal
lokeshpahal / A slack_logger.py
Created February 21, 2019 06:35 — forked from DominikSerafin/01_info
Django Slack Logger
import requests
import json
import time
import math
from copy import copy
from django.conf import settings
from django.utils.log import AdminEmailHandler
from django.views.debug import ExceptionReporter
class SlackExceptionHandler(AdminEmailHandler):