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 | |
""" | |
Print out the apps and clients that are inhibiting session actions like log out, user switching, suspending or idle. | |
%InsertOptionParserUsage% | |
Example: | |
track_session_inhibitors & | |
Todo: |
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
update wp_posts set | |
post_content = replace(post_content, CONVERT(CAST(CONVERT('¡' USING utf8) AS BINARY) USING latin1), '¡'), | |
post_content = replace(post_content, CONVERT(CAST(CONVERT('¢' USING utf8) AS BINARY) USING latin1), '¢'), | |
post_content = replace(post_content, CONVERT(CAST(CONVERT('£' USING utf8) AS BINARY) USING latin1), '£'), | |
post_content = replace(post_content, CONVERT(CAST(CONVERT('¤' USING utf8) AS BINARY) USING latin1), '¤'), | |
post_content = replace(post_content, CONVERT(CAST(CONVERT('¥' USING utf8) AS BINARY) USING latin1), '¥'), | |
post_content = replace(post_content, CONVERT(CAST(CONVERT('¦' USING utf8) AS BINARY) USING latin1), '¦'), | |
post_content = replace(post_content, CONVERT(CAST(CONVERT('§' USING utf8) AS BINARY) USING latin1), '§'), | |
post_content = replace(post_content, CONVERT(CAST(CONVERT('¨' USING utf8) AS BINARY) USING latin1), '¨'), | |
post_content = replace(post_content, CONVERT(CAST(CONVERT('©' USING utf8) AS BINARY) USING latin1), '©'), |
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
.... | |
Parameters: | |
.... | |
CidrBlock: | |
Default: 172.21.0.0/16 | |
Description: VPC Cidr Block | |
Type: String | |
AllowedPattern: "\\d+.\\d+.\\d+.\\d+/\\d+" | |
ConstraintDescription: Must be CIDR | |
Subnets: |
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
StaticAssetsS3Bucket: | |
Type: AWS::S3::Bucket | |
Properties: | |
BucketName: my-encrypted-bucket | |
BucketEncryption: | |
ServerSideEncryptionConfiguration: | |
- ServerSideEncryptionByDefault: | |
SSEAlgorithm: AES256 | |
VersioningConfiguration: | |
Status: Enabled |
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
Imports System | |
Imports System.Drawing | |
Module Program | |
Sub Main(args As String()) | |
Dim sourcePath As String = args(0) | |
Dim outputPath As String = args(1) | |
IO.Directory.CreateDirectory(outputPath) |
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 | |
# -*- ENCODING: UTF-8 -*- | |
#Requiere de permisos de ejecución:$chmod -x prepros_install.sh | |
#Ejecutar como Root: $bash prepros_install.sh | |
#Validando Acceso Root | |
if [[ $EUID -ne 0 ]]; then | |
echo "Tienes que ejecutar este script como Root" 1>&2 | |
exit 1 | |
fi |
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
aws route53 list-hosted-zones-by-name --dns-name example.com --query HostedZones[].Id --output text | cut -d/ -f3 |
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
# to be able to import ldap run pip install python-ldap | |
import ldap | |
if __name__ == "__main__": | |
ldap_server="x.x.x.x" | |
username = "someuser" | |
password= "somepassword" | |
# the following is the user_dn format provided by the ldap server | |
user_dn = "uid="+username+",ou=someou,dc=somedc,dc=local" |
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
#XLarge DBInstanceClassMemory = 15892177440 = 14.8GB | |
#/32 = 496630545 = 473MB | |
#/64 = 248315272 = 236MB | |
#/128 = 124157636 = 118MB | |
#/256 = 62078818 = 59MB | |
#/512 = 31039409 = 29MB | |
#/12582880 = 1263 #default same divisor as max_connections = 4041.6MB = 4237924762 | |
#/25165760 = 623 # half of max_connections = 1993.6MB | |
#/50331520 = 315 # quarter of max_connections = 1008MB = 1056964608 | |
#*(3/4) #default innodb pool size = 11922309120 |
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/env python | |
#coding=utf-8 | |
import apt | |
import apt_pkg | |
from time import strftime | |
import os | |
import subprocess | |
import sys |
OlderNewer