This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# We'll be installing Homebrew in the /opt directory. | |
cd /opt | |
# Create a directory for Homebrew. This requires root permissions. | |
sudo mkdir homebrew | |
# Make us the owner of the directory so that we no longer require root permissions. | |
sudo chown -R $(whoami) /opt/homebrew | |
# Download and unzip Homebrew. This command can be found at https://docs.brew.sh/Installation. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import 'package:flutter/material.dart'; | |
import 'package:flutter/rendering.dart'; | |
void main() async => | |
runApp(MaterialApp(debugShowCheckedModeBanner: false, home: DemoScreen())); | |
class DemoScreen extends StatefulWidget { | |
@override | |
_DemoScreenState createState() => _DemoScreenState(); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
reference url | |
""" | |
https://pypi.org/project/django-crontab/ | |
""" | |
install cron tab for django | |
""" | |
pip install django-crontab | |
""" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// filter.swift | |
// fltr | |
// | |
// Created by Avinash on 18/06/19. | |
// Copyright © 2019 eightyfive. All rights reserved. | |
// | |
import Metal | |
import MetalKit |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from: http://stackoverflow.com/a/35631022/667834 | |
$ brew install youtube-dl | |
$ youtube-dl --list-formats https://www.youtube.com/watch\?v\=[YouTube video id] | |
shows something like: | |
.... | |
91 mp4 144p HLS , h264, aac @ 48k |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from django.http import QueryDict | |
from django.http.multipartparser import MultiValueDict | |
class RESTMiddleware(object): | |
def process_request(self,request): | |
request.PUT=QueryDict('') | |
request.DELETE = QueryDict('') | |
method = request.META.get('REQUEST_METHOD','').upper() #upper ? rly? | |
if method == 'PUT': | |
self.handle_PUT(request) |