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
// Author: Ramon Morcillo @reymon359 | |
import { Platform } from "ionic-angular"; | |
import { Storage } from "@ionic/storage"; | |
@Injectable() | |
export class StorageProvider { | |
constructor(private platform: Platform, private storage: Storage) { | |
console.log('Hello Storage Provider'); | |
} |
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
// Author: Ramon morcillo @reymon359 | |
function random() { | |
return Math.random().toString(36).substr(2); // To remove `0.` | |
} | |
function token() { | |
return random() + random(); // To make it longer | |
} |
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
const express = require('express'); | |
let app = express(); | |
let example = require('../models/example'); | |
// Create a new example | |
app.post('/example', (req, res) => { | |
let body = req.body; | |
let example = new example({ |
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
// this function makes that the token environment variable updates after making the login | |
let resp = pm.response.json(); | |
if(resp.ok){ | |
let token = resp.token; | |
pm.environment.set("token",token); | |
}else{ | |
console.log('Token was not updated'); | |
} |
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
# Specifically for the iPython Notebook environment for clearing output | |
from IPython.display import clear_output | |
import random | |
# Global variables | |
theBoard = [' '] * 10 # a list of empty spaces | |
available = [str(num) for num in range(0,10)] # a List Comprehension | |
players = [0,'X','O'] # note that players[1] == 'X' and players[-1] == 'O' |
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 STATEMENTS AND VARIABLE DECLARATIONS: | |
import random | |
suits = ('Hearts', 'Diamonds', 'Spades', 'Clubs') | |
ranks = ('Two', 'Three', 'Four', 'Five', 'Six', 'Seven', 'Eight', 'Nine', 'Ten', 'Jack', 'Queen', 'King', 'Ace') | |
values = {'Two':2, 'Three':3, 'Four':4, 'Five':5, 'Six':6, 'Seven':7, 'Eight':8, | |
'Nine':9, 'Ten':10, 'Jack':10, 'Queen':10, 'King':10, 'Ace':11} | |
playing = True |
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
pattern="[a-z0-9._%+-]+@[a-z0-9.-]+\.[a-z]{2,3}$" |
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
#!/bin/bash | |
git branch -D gh-pages | |
git push origin --delete gh-pages | |
git checkout -b gh-pages | |
ionic build --prod | |
find . -type d ! -path './www*' ! -path './.git*' ! -path '.' | xargs rm -rf | |
rm -r *.* | |
mv www/* . | |
rm -rf www | |
git add . |
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
// Future versions of Hyper may add additional config options, | |
// which will not automatically be merged into this file. | |
// See https://hyper.is#cfg for all currently supported options. | |
module.exports = { | |
config: { | |
// choose either `'stable'` for receiving highly polished, | |
// or `'canary'` for less polished but more frequent updates | |
updateChannel: 'stable', |
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
#! /bin/bash/ps1/ | |
#! 🥝🥝IMPORTANT🍅🍅 Before doing this, change the path of images from path="imagePath" to path="./imagePath" | |
#! Then install the angular-cli-ghpages globally | |
npm install -g angular-cli-ghpages | |
#! Now lets build the project in to a project folder | |
ng build --prod --output-path project --base-href "https://<githubUsername>.github.io/<repositoryName>/" | |
#! Publishing it to gh pages |
OlderNewer