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
| sudo apt-get install openjdk-7-jre | |
| sudo apt-get install openjdk-7-jdk | |
| java -version | |
| # Download the security key for the Jenkins repository & add it to the keychain | |
| wget -q -O - https://jenkins-ci.org/debian/jenkins-ci.org.key | sudo apt-key add - | |
| # Add the Jenkins sources to apt | |
| sudo sh -c 'echo deb http://pkg.jenkins-ci.org/debian binary/ > /etc/apt/sources.list.d/jenkins.list' | |
| # Update the list of packages |
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 node:latest | |
| # Initialize | |
| RUN mkdir -p /data/app | |
| WORKDIR /data/app | |
| COPY . /data/app | |
| RUN npm install && \ |
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
| package main | |
| import ( | |
| "fmt" | |
| "net/http" | |
| ) | |
| const ( | |
| //user_is_authenticated = false | |
| user_is_authenticated = true |
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
| const request = require('request'); | |
| const cheerio = require('cheerio'); | |
| const fs = require('fs'); | |
| request("https://news.ycombinator.com/news", function(err, resp, body) { | |
| if(err) { | |
| console.log(`ERROR: ${err}`); | |
| } | |
| console.log(`STATUS CODE: ${resp.statusCode}`); |
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
| /* rewritten example of JsonWebToken example | |
| * from https://gist.github.com/thealexcons/4ecc09d50e6b9b3ff4e2408e910beb22 | |
| * Keys are generated and packed to PEM-format at server start | |
| * Plus some fixes and refactors | |
| * | |
| * My respect to thealexcons | |
| */ | |
| package main | |
| import ( |
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
| package main | |
| import ( | |
| "io/ioutil" | |
| "log" | |
| "strings" | |
| "net/http" | |
| "encoding/json" | |
| "fmt" | |
| "time" |
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
| # Send to single device. | |
| from pyfcm import FCMNotification | |
| push_service = FCMNotification(api_key="put-your-key-app-here") | |
| # Your api-key can be gotten from: https://console.firebase.google.com/project/<project-name>/settings/cloudmessaging | |
| registration_id = "put-your-key-device-here" | |
| message_title = "Hi john, your customized news for today is ready" | |
| message_body = "Hope you're having fun this weekend, don't forget to check today's news" |
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
| # iOS | |
| app_identifier "com.myapp.app" # The bundle identifier of your app | |
| apple_id "me@gmail.com" # Your Apple email address | |
| team_id "1234ABCD" # Developer Portal Team ID | |
| # Android | |
| json_key_file "./google-play-api-secret.json" # Path to the json secret file - Follow https://github.com/fastlane/supply#setup to get one | |
| package_name "com.myapp.app" # Your Android app package |
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 centos:centos6 | |
| MAINTAINER nigelpoulton@hotmail.com | |
| # Enable EPEL for Node.js | |
| RUN rpm -Uvh http://download.fedoraproject.org/pub/epel/6/i386/epel-release-6-8.noarch.rpm | |
| # Install Node... | |
| RUN yum install -y npm |
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
| # | |
| # First Flask App Dockerfile | |
| # | |
| # | |
| # Pull base image. | |
| FROM centos:7.0.1406 | |
| # Build commands | |
| RUN yum install -y python-setuptools mysql-connector-python mysql-devel gcc python-devel |