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
.PHONY: help | |
help: ## Show this help message. | |
@egrep -h '\s##\s' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-20s\033[0m %s\n", $$1, $$2}' | |
env: ## Setup environment | |
@echo "Setuping env...." | |
install: ## Install or update dependencies | |
@echo "Installing dependencies..." |
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
# create redis extension for flask | |
import redis | |
from flask import current_app, _app_ctx_stack | |
class MyRedis(object): | |
"""Manage Redis Connection""" | |
def __init__(self, app=None): | |
self.app = app |
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
<VirtualHost *:80> | |
DocumentRoot "/Users/myName/Projects/laravel/public" | |
ServerName myLaravel.dev | |
<Directory "/Users/myName/Projects/laravel/public"> | |
AllowOverride All | |
Options +FollowSymLinks +Indexes | |
Order allow,deny | |
Allow from all | |
</Directory> | |
</VirtualHost> |
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
<?php | |
/** | |
* Function: convert_number | |
* | |
* Description: | |
* Converts a given integer (in range [0..1T-1], inclusive) into | |
* alphabetical format ("one", "two", etc.) | |
* | |
* @int | |
* |
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
Below 2 files are needed! |
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
version: '3' | |
services: | |
awesome: | |
image: awesome | |
ports: | |
- 8080 | |
environment: | |
- SERVICE_PORTS=8080 | |
deploy: |
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
=========START============== | |
#for massive file rename | |
num=1 | |
for file in $(ls -v *.jpg); do | |
mv "$file" "$num.jpg" | |
num=$((num+1)) | |
done | |
=========END================ |
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
http://lmgtfy.com/?q=hrshadhin |
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
How to uninstall GRUB and get windows 7 bootloader back? | |
======================================================== | |
#Open Up recovary console | |
>Bootrec.exe /FixMbr | |
>Bootrec.exe /FixBoot |
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
addEventListener('fetch', event => { | |
event.respondWith(fetchAndCheckPassword(event.request)) | |
}) | |
async function fetchAndCheckPassword(req) { | |
if (req.method == "POST") { | |
try { | |
const post = await req.formData(); | |
const pwd = post.get('password') | |
const enc = new TextEncoder("utf-8").encode(pwd) |
NewerOlder