- cut shoud be -c
- Add python certbot
- editing /etc/sudoers is by visudo
- dd if=/dev/urandom bs=1k count=1024 | base64 | cut -c1-40 | head -n 1
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
#List all users | |
SELECT User FROM mysql.user; | |
# Create new user | |
CREATE USER 'newuser'@'localhost' IDENTIFIED BY 'password'; | |
# Graniting priviledges (databs.table) | |
GRANT ALL PRIVILEGES ON * . * TO 'newuser'@'localhost'; | |
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/python | |
import csv | |
firstline = True | |
def savetofile(file, content): | |
with open(file, 'w') as file: | |
file.write(content) | |
def checkfirst(): |
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
object(Laravel\Socialite\Two\User)#459 (8) { | |
["token" ]=> string(209) "{token}" | |
["id"] => string(17) "{socialID}" | |
["nickname"] => NULL | |
["name"] => string(14) "{Full Name}" | |
["email"] => string(19) "{Email address}" | |
["avatar"] => string(69) "https://graph.facebook.com/v2.4/{socialID}/picture?type=normal" | |
["user"] => array(6) { | |
["first_name"] => string(6) "{First name}" | |
["last_name"] => string(7) "{Last mame}" |
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 | |
/** | |
* SageOne Library | |
* | |
* @category Library | |
* @package SageOne | |
* @author Brian Cline https://stackoverflow.com/a/254543/536434 / Brian Maiyo kiproping@github.com | |
* @license MIT <https://github.com/darrynten/sage-one-php/blob/master/LICENSE> | |
* @link https://github.com/darrynten/sage-one-php | |
*/ |
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
#!/usr/bin/python | |
#Returns mysql cursor | |
import MySQLdb | |
class DBconnect(): | |
def __init__(self, name="cc", host="localhost", user="cc", passwd="cc"): | |
self.name = name | |
self.host = host |
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
from subprocess import * | |
import time | |
from random import randint | |
path = "songs.lst" | |
sleepaftersong = 10 #seconds sleep after each song | |
sleepaftermax = 600 #seconds sleep after max consecutive songs | |
maxdownload = 40 #Downloads before long wait | |
def main(): |