Skip to content

Instantly share code, notes, and snippets.

Avatar
🇵🇭
Pinas UTC +8

Kris Carillo kriscarilloxyz

🇵🇭
Pinas UTC +8
View GitHub Profile
@kriscarilloxyz
kriscarilloxyz / mongo-docker.bash
Created May 6, 2021 — forked from davideicardi/mongo-docker.bash
Running mongodb inside a docker container (with mongodb authentication)
View mongo-docker.bash
# Create a container from the mongo image,
# run is as a daemon (-d), expose the port 27017 (-p),
# set it to auto start (--restart)
# and with mongo authentication (--auth)
# Image used is https://hub.docker.com/_/mongo/
docker pull mongo
docker run --name YOURCONTAINERNAME --restart=always -d -p 27017:27017 mongo mongod --auth
# Using the mongo "localhost exception" (https://docs.mongodb.org/v3.0/core/security-users/#localhost-exception)
# add a root user
View admin.php
<!DOCTYPE html>
<html lang="en">
<?php include('config.php') ?>
<?php include('components/header.php') ?>
<body>
<div id="particles-js"></div>
<?php include('components/navigation/default.php') ?>
View margin_padding_helper.css
.p-0 {
padding: 0px;
}
.p-3 {
padding: 3px;
}
.p-5 {
padding: 5px;
@kriscarilloxyz
kriscarilloxyz / sample.spec
Created Nov 18, 2018
Include pandas in pyinstaller
View sample.spec
# -*- mode: python -*-
block_cipher = None
a = Analysis(['sample.py'],
pathex=['C:\\Users\\bacon\\menudo\\clients\\kenan-erol\\kenan-erol-tasks'],
binaries=[],
datas=[],
View firebase.py
"""
A script that loads a GitHub repositories info and updates a Firebase database with it.
You will require the following database rules:
{
"rules": {
"repositories": {
".write": "auth != null",
".read": true
View fb_comment_test.py
from selenium import webdriver
import time
fb_page_post = "https://mbasic.facebook.com/FilipinoChannelonline/photos/a.868812129879437.1073741828.862963130464337/1743889889038319/?type=3&permPage=1"
fb_link = "https://mbasic.facebook.com/login/?ref=dbl&fl&refid=8"
user = input("username: ")
pwd = input("password: ")
driver = webdriver.Chrome()
@kriscarilloxyz
kriscarilloxyz / cd-aws-s3-wercker.md
Created Apr 24, 2018 — forked from NicolasRitouet/cd-aws-s3-wercker.md
How to automate deployment on AWS S3 with bitbucket (or github) and wercker
View cd-aws-s3-wercker.md

This tutorial explains how to deploy automatically from bitbucket (or github) to AWS S3.

Create a bitbucket repository (public or private).

Add this repo on Wercker

  • Go to Create Application
  • Select use bitbucket (or github)
  • Choose your repo
  • For the next questions, choose the default answers
@kriscarilloxyz
kriscarilloxyz / api.py
Created Feb 28, 2018 — forked from alanhamlett/api.py
Serialize SQLAlchemy Model to dictionary (for JSON output) and update Model from dictionary attributes.
View api.py
import uuid
import wtforms_json
from sqlalchemy import not_
from sqlalchemy.dialects.postgresql import UUID
from wtforms import Form
from wtforms.fields import FormField, FieldList
from wtforms.validators import Length
from flask import current_app as app
from flask import request, json, jsonify, abort