Skip to content

Instantly share code, notes, and snippets.

View nateshmbhat's full-sized avatar
👨‍💻
Eat - Sleep - Code - Repeat ✨

Natesh Bhat nateshmbhat

👨‍💻
Eat - Sleep - Code - Repeat ✨
View GitHub Profile
@nateshmbhat
nateshmbhat / shaking_error_text.dart
Created October 3, 2020 11:45
Shaking Error Text Widget
import 'package:flutter/material.dart';
import 'package:provider/provider.dart';
import 'package:simple_animations/simple_animations.dart';
enum ErrorAnimationProp { offset }
class ShakingErrorText extends StatelessWidget {
final ShakingErrorController controller;
final int timesToShake;
final MultiTween<ErrorAnimationProp> _tween;
@nitinbhojwani
nitinbhojwani / django_send_mail
Created May 4, 2016 18:33
Django - Send a Mail with Attachment File like CSV
# Import EmailMessage class - https://docs.djangoproject.com/en/1.9/topics/email/#django.core.mail.EmailMessage
from django.core.mail import EmailMessage
email = EmailMessage('... Subject ...', '... Body ...', 'from-email',
['to-email-1', 'to-email-2'], ['bcc-email-1', 'bcc-email-2'])
# now let's create a csv file dynamically
import csv, StringIO
attachment_csv_file = StringIO.StringIO()
writer = csv.writer(attachment_csv_file)
@cobyism
cobyism / gh-pages-deploy.md
Last active May 23, 2024 10:55
Deploy to `gh-pages` from a `dist` folder on the master branch. Useful for use with [yeoman](http://yeoman.io).

Deploying a subfolder to GitHub Pages

Sometimes you want to have a subdirectory on the master branch be the root directory of a repository’s gh-pages branch. This is useful for things like sites developed with Yeoman, or if you have a Jekyll site contained in the master branch alongside the rest of your code.

For the sake of this example, let’s pretend the subfolder containing your site is named dist.

Step 1

Remove the dist directory from the project’s .gitignore file (it’s ignored by default by Yeoman).