Skip to content

Instantly share code, notes, and snippets.

View gaybro8777's full-sized avatar
💭
Im not gay. I'm just getting back at my dad for not getting me an xbox

Michael Corrado gaybro8777

💭
Im not gay. I'm just getting back at my dad for not getting me an xbox
View GitHub Profile
@gaybro8777
gaybro8777 / main.dart
Created March 25, 2019 13:28 — forked from branflake2267/main.dart
Flutter - Upgrading to Dart 2, JSON & Casting
import 'dart:async';
import 'dart:convert';
import 'package:flutter/material.dart';
void main() => runApp(new MyApp());
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
@gaybro8777
gaybro8777 / selenium_login_gmail.py
Created February 24, 2019 09:23 — forked from qustosh/selenium_login_gmail.py
Use selenium to auto login gmail account
import time
from selenium import webdriver
from selenium.webdriver.common.keys import Keys
driver= webdriver.Firefox()
#driver= webdriver.Chrome("E:\QA\Resource\WEBDRIVER\chromedriverserver\chromedriver.exe")
driver.get("http://mail.google.com")
'''This script goes along the blog post
"Building powerful image classification models using very little data"
from blog.keras.io.
It uses data that can be downloaded at:
https://www.kaggle.com/c/dogs-vs-cats/data
In our setup, we:
- created a data/ folder
- created train/ and validation/ subfolders inside data/
- created cats/ and dogs/ subfolders inside train/ and validation/
- put the cat pictures index 0-999 in data/train/cats
@gaybro8777
gaybro8777 / sortk.dart
Created February 23, 2019 22:31 — forked from asgerf/sortk.dart
import 'package:kernel/kernel.dart';
main(List<String> args) {
var program = loadProgramFromBinary(args[0]);
program.libraries.sort((x,y) => x.importUri.toString().compareTo(y.importUri.toString()));
for (var lib in program.libraries) {
lib.classes.sort((x,y) => x.name.compareTo(y.name));
}
writeProgramToBinary(program, args[0]);
}
@gaybro8777
gaybro8777 / calendar.component.html
Created February 22, 2019 23:16 — forked from bentedder/calendar.component.html
calendar component angular 4
<div class="calendar">
<div class="calendar-navs">
<div class="month-nav">
<button (click)="prevMonth()">&lt;</button>
<span class="p4">{{ currentDate.format('MMMM') }}</span>
<button (click)="nextMonth()">&gt;</button>
</div>
<div class="year-nav">
<button (click)="prevYear()">&lt;</button>
<span>{{ currentDate.format('YYYY') }}</span>
@gaybro8777
gaybro8777 / hallo-mirrorstage.coffee
Created January 30, 2019 06:20 — forked from wren-hearn/hallo-mirrorstage.coffee
Extending hallo.js using Wagtail hooks
((jQuery) ->
jQuery.widget "IKS.mirrorstageeditor",
boldElement: null
options:
uuid: ''
editable: null
_create: ->
@gaybro8777
gaybro8777 / wagtail_remote_image.py
Created January 30, 2019 06:16 — forked from eyesee1/wagtail_remote_image.py
Grabbing image data from a URL and saving into Wagtail CMS - example code
from io import BytesIO
import requests
from django.core.files.images import ImageFile
from wagtail.wagtailimages.models import Image
# event is a model object, substitute your model
# filename and title are up to you
# in my model, event.event_image is a ForeignKey to wagtailimages.Image
response = requests.get(url)
@gaybro8777
gaybro8777 / functions.sh
Created January 25, 2019 04:56 — forked from junegunn/functions.sh
Key bindings for git with fzf (https://junegunn.kr/2016/07/fzf-git/)
# GIT heart FZF
# -------------
is_in_git_repo() {
git rev-parse HEAD > /dev/null 2>&1
}
fzf-down() {
fzf --height 50% "$@" --border
}
@gaybro8777
gaybro8777 / readme.md
Created December 31, 2018 17:39 — forked from dominictarr/readme.md
statement on event-stream compromise

Hey everyone - this is not just a one off thing, there are likely to be many other modules in your dependency trees that are now a burden to their authors. I didn't create this code for altruistic motivations, I created it for fun. I was learning, and learning is fun. I gave it away because it was easy to do so, and because sharing helps learning too. I think most of the small modules on npm were created for reasons like this. However, that was a long time ago. I've since moved on from this module and moved on from that thing too and in the process of moving on from that as well. I've written way better modules than this, the internet just hasn't fully caught up.

@broros

otherwise why would he hand over a popular package to a stranger?

If it's not fun anymore, you get literally nothing from maintaining a popular package.

One time, I was working as a dishwasher in a restu