This file contains hidden or 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 ubuntu:latest | |
MAINTAINER Ahmed Maawy | |
# Run updates | |
RUN apt-get update --fix-missing && apt-get install -y | |
# Install Curl | |
RUN apt-get install curl -y | |
# Install supervisor |
This file contains hidden or 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
https://storage.googleapis.com/books/ngrams/books/googlebooks-ita-all-2gram-20120701-a_.gz | |
https://storage.googleapis.com/books/ngrams/books/googlebooks-ita-all-2gram-20120701-aa.gz | |
https://storage.googleapis.com/books/ngrams/books/googlebooks-ita-all-2gram-20120701-ab.gz | |
https://storage.googleapis.com/books/ngrams/books/googlebooks-ita-all-2gram-20120701-ac.gz | |
https://storage.googleapis.com/books/ngrams/books/googlebooks-ita-all-2gram-20120701-ad.gz | |
https://storage.googleapis.com/books/ngrams/books/googlebooks-ita-all-2gram-20120701-ae.gz | |
https://storage.googleapis.com/books/ngrams/books/googlebooks-ita-all-2gram-20120701-af.gz | |
https://storage.googleapis.com/books/ngrams/books/googlebooks-ita-all-2gram-20120701-ag.gz | |
https://storage.googleapis.com/books/ngrams/books/googlebooks-ita-all-2gram-20120701-ah.gz | |
https://storage.googleapis.com/books/ngrams/books/googlebooks-ita-all-2gram-20120701-ai.gz |
This file contains hidden or 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
extension CGPoint : Hashable { | |
func distance(point: CGPoint) -> Float { | |
let dx = Float(x - point.x) | |
let dy = Float(y - point.y) | |
return sqrt((dx * dx) + (dy * dy)) | |
} | |
public var hashValue: Int { | |
// iOS Swift Game Development Cookbook | |
// https://books.google.se/books?id=QQY_CQAAQBAJ&pg=PA304&lpg=PA304&dq=swift+CGpoint+hashvalue&source=bl&ots=1hp2Fph274&sig=LvT36RXAmNcr8Ethwrmpt1ynMjY&hl=sv&sa=X&ved=0CCoQ6AEwAWoVChMIu9mc4IrnxgIVxXxyCh3CSwSU#v=onepage&q=swift%20CGpoint%20hashvalue&f=false | |
return x.hashValue << 32 ^ y.hashValue |
This file contains hidden or 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 an Ubuntu 16.04 Instance with 20GB of HD space | |
###Update Ubuntu | |
sudo apt-get update | |
sudo apt-get -y upgrade | |
###Download Nvidia Software | |
wget https://developer.nvidia.com/compute/cuda/8.0/Prod2/local_installers/cuda_8.0.61_375.26_linux-run |
This file contains hidden or 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
#!/bin/bash | |
#set -x | |
readonly progname=$(basename $0) | |
readonly ARGS="$@" | |
#see https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-instance-metadata.html | |
mydate=$(date +"%Y%m%d-%H%M") | |
S3BUCKET="camelinc-cracking" |
This file contains hidden or 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
#!/bin/bash | |
#################################################################################### | |
## AWS GPU Instance Setup Script ## | |
## John Pope ## | |
## ## | |
## Gist location: https://gist.github.com/johndpope/ac3ae5f4e033d1ca6c94d3387e4dc309 ## | |
## Date updated: 2018/08/17 ## | |
#################################################################################### |
This file contains hidden or 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 QuartzCore | |
func executionTimeInterval(block: () -> ()) -> CFTimeInterval { | |
let start = CACurrentMediaTime() | |
block(); | |
let end = CACurrentMediaTime() | |
return end - start | |
} | |
This file contains hidden or 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
#!/usr/bin/env python | |
# Based on https://www.openwall.com/lists/oss-security/2018/08/16/1 | |
# untested CVE-2018-10933 | |
import sys, paramiko | |
import logging | |
username = sys.argv[1] | |
hostname = sys.argv[2] | |
command = sys.argv[3] |
This file contains hidden or 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
source 'https://rubygems.org' | |
gem 'cocoapods', '~> 0.39.0' | |
#gem 'cocoapods', :git => 'https://github.com/CocoaPods/CocoaPods.git', :branch => '0.39-stable' | |
gem 'activesupport', '< 5' |
This file contains hidden or 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
#!/usr/bin/swift sh | |
import Foundation | |
import PromiseKit // @mxcl ~> 6.5 | |
import Swifter // @mattdonnelly == b27a89 | |
let swifter = Swifter( | |
consumerKey: "FILL", | |
consumerSecret: "ME", | |
oauthToken: "IN", | |
oauthTokenSecret: "https://developer.twitter.com/en/docs/basics/apps/overview.html" |