Skip to content

Instantly share code, notes, and snippets.

Michael Vieth mavieth

Block or report user

Report or block mavieth

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@mavieth
mavieth / AppDelegate.swift
Created Apr 1, 2019
Swift TabsController
View AppDelegate.swift
import UIKit
import Material
@UIApplicationMain
class AppDelegate: UIResponder, UIApplicationDelegate {
var window: UIWindow?
func applicationDidFinishLaunching(_ application: UIApplication) {
window = UIWindow(frame: Screen.bounds)
View PresenterCard.swift
import UIKit
import Material
class ViewController: UIViewController {
fileprivate var card: PresenterCard!
/// Conent area.
fileprivate var presenterView: UIImageView!
fileprivate var contentView: UILabel!
View SwipeGestureRecognizer.swift
class PurpleViewController: UIViewController {
fileprivate var label = UILabel()
open override func viewDidLoad() {
super.viewDidLoad()
prepareView()
prepareSwipe()
}
}
@mavieth
mavieth / setup.sh
Created Mar 13, 2019 — forked from rg3915/setup.sh
Shell script to create a simple Django project.
View setup.sh
# Shell script for create a simple Django project.
# wget --output-document=setup.sh https://goo.gl/pm621U
# Type the following command, you can change the project name.
# source setup.sh myproject
# Colors
red=`tput setaf 1`
green=`tput setaf 2`
@mavieth
mavieth / paint-polygon.js
Created Jul 25, 2018
Paint open layers polygon.
View paint-polygon.js
import Map from '../src/ol/Map.js';
import View from '../src/ol/View.js';
import Draw from '../src/ol/interaction/Draw.js';
import Modify from '../src/ol/interaction/Modify.js';
import {Tile as TileLayer, Vector as VectorLayer} from '../src/ol/layer.js';
import {OSM, Vector as VectorSource} from '../src/ol/source.js';
import {Stroke, Style, Fill, Circle} from '../src/ol/style.js';
import {GeoJSON} from '../src/ol/format.js';
let features = [];
View teams.txt
-------------------michael------------------
1. Dez Bryant WR DAL 9.3 $ 6900
2. Jared Goff QB LAR 16.7 $ 6700
3. Carlos Hyde RB SF 11.5 $ 6300
4. Evan Engram TE NYG 9.0 $ 6200
5. Devonta Freeman RB ATL 12.5 $ 6000
6. Sterling Shepard WR NYG 8.3 $ 5500
7. Lamar Miller RB HOU 10.7 $ 5200
8. Marquise Goodwin WR SF 6.0 $ 3800
9. Giants DST NYG 8.2 $ 3200
View pypdf.py
from __future__ import division
from collections import Counter, OrderedDict, defaultdict
from itertools import chain, combinations
from copy import deepcopy
from random import getrandbits, uniform
from pulp import LpProblem, LpMaximize, LpVariable, LpInteger, lpSum
from .exceptions import LineupOptimizerException, LineupOptimizerIncorrectTeamName, LineupOptimizerIncorrectPositionName
from .settings import BaseSettings
from .player import Player
from .lineup import Lineup
View gist:ab288be81beddb0dd4ac693730bc9df5
echo 'export NVM_DIR="$HOME/.nvm"' > ~/.bash_profile
echo '[ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh"' > ~/.bash_profile
. ~/.bash_profile
@mavieth
mavieth / remove_node_modules.sh
Created Sep 3, 2017
Remove all node modules recursively
View remove_node_modules.sh
#!/bin/bash
find . -name "node_modules" -exec rm -rf '{}' +
@mavieth
mavieth / install-php-7.sh
Created May 2, 2017
Upgrade from PHP 5.X.X to PHP 7 on an AWS EC2 Linux Server
View install-php-7.sh
#!/bin/bash
echo "==============================="
echo "Installing PHP 7"
echo "==============================="
sudo yum install php70
echo "==============================="
echo "Installing PHP 7 additional commonly used php packages"
echo "==============================="
You can’t perform that action at this time.