Skip to content

Instantly share code, notes, and snippets.

View BlackMetalz's full-sized avatar
🎯
Focusing

Luong Trung Kien BlackMetalz

🎯
Focusing
  • Hà Nội
View GitHub Profile
@UtahDave
UtahDave / saltsample_09252012_01
Created September 26, 2012 02:54 — forked from l2ol33rt/saltsample_09252012_01
Saltstack sample of using states and pillars for users
Here is a sample of how I am currently dealing with users.
Big thanks to uggedal! I used his user states as an example: https://github.com/uggedal/states
###
# How to create password hashes
###
python -c "import crypt; print crypt.crypt('password', '\$6\$SALTsalt\$')"
###
@Lillecarl
Lillecarl / readme.txt
Last active October 10, 2023 21:30
Linux mangos/trinitycore restarter, made for *nix handicapped people. Creds to Dufernst for coming up with some ideas :). Thanks google for bash syntax... xD
To run wowadmin you must specify your servers locations inside the script and set the proper names.
The reason i use "oldname" and "newname" for worlserver binary is because you might want to run more then 1 realm, then you set up 2 wowadmin.sh clones, same authserver config, but different worldserver path and "newnames". This will make multirealming on linux very simple.
reports/suggestions? comment here or email: lillecarl RETARDEDA gmail.com
This gist will be updated when the restarter is. Regards
NEEDED PACKAGES:
@mattmezza
mattmezza / vhost.sh
Last active November 30, 2023 08:30
bash script to create virtual host vhost with apache httpd and CentOs 7
#!/bin/bash
# This script is used for create virtual hosts on CentOs.
# Created by alexnogard from http://alexnogard.com
# Improved by mattmezza from http://you.canmakethat.com
# Feel free to modify it
# PARAMETERS
#
# $usr - User
# $dir - directory of web files
# $servn - webserver address without www.
@litnimax
litnimax / gist:1a02be9091ace89f3603
Created October 20, 2015 14:44
Flask signal example
from flask import Flask
from flaskext.sqlalchemy import SQLAlchemy, models_comitted
app = Flask(__name__)
db = SQLAlchemy(app)
class Post(db.Model):
id = db.Column('post_id', db.Integer, primary_key=True)
title = db.Column(db.String(200))
text = db.Column(db.String)
@mreschke
mreschke / nginx.conf
Last active May 14, 2024 14:54
Nginx config for multiple laravel sites based on /api/v1 url paths
# This config will host your main [Laravel] GUI application at /, and any additional [Lumen] webservices at /api/v1 and /api/v2...
# This also works perfectly for all static file content in all projects
# This is full of debug comments so you can see how to print debug output to browser! Took me hours to nail this perfect config.
# Example:
# http://example.com - Main Laravel site as usual
# http://example.com/about - Main Laravel site about page as usual
# http://example.com/robots.txt - Main Laravel site static content as usual
# http://example.com/api/v1 - Lumen v1 api default / route
# http://example.com/api/v1/ - Lumen v1 api default / route
@jacurtis
jacurtis / about.blade.php
Created February 4, 2016 17:05
Build a Blog with Laravel Part 5.5 File Download
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- The above 3 meta tags *must* come first in the head; any other head content must come *after* these tags -->
<title>Laravel Blog</title>
@imwilsonxu
imwilsonxu / app.py
Last active February 16, 2023 04:57
[Flask + Wtforms + Select2] #flask
# -*- coding: utf-8 -*-
from flask import Flask, request, render_template, current_app
from flask_wtf import Form
from wtforms.validators import DataRequired
from wtforms import SelectField, SelectMultipleField, SubmitField
app = Flask(__name__)
DELETE FROM creature_template WHERE entry = '90006';
INSERT INTO `creature_template` VALUES ('90006', '0', '0', '0', '0', '0', '42063', '42061', '0', '0', 'Teleporter', 'Locations', 'Directions', '55555', '90', '90', '4', '0', '35', '3', '1', '1.14286', '1', '1', '0', '0', '0', '0', '1', '0', '0', '1', '0', '2048', '0', '0', '0', '0', '0', '0', '0', '0', '7', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', 'SmartAI', '0', '3', '1', '12', '0', '0', '0', '0', '0', '0', '', '0', '1', '0', '0', '', '1', '1', '1', '1', '0');
DELETE FROM creature_template_addon WHERE Entry = '90006' ;
INSERT INTO creature_template_addon (entry, mount, bytes1, bytes2, emote, path_id, auras) VALUES
('90006', 0, 0, 0, 0, 0, '35766');
DELETE FROM gossip_menu WHERE entry>'55555'-1 AND entry<'55555'+9;
DELETE FROM npc_text WHERE ID>'333333'-1 AND ID<'333333'+5;
INSERT INTO gossip_menu (entry, text_id) VALUES
('55555'+4, '333333'+3),
('55555'+3, '333333'+2),