This file contains hidden or 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
"use strict"; | |
(function() { | |
function BaseClass($) { | |
// element collection | |
var elements = []; | |
// if element isn't null, then set it as current element | |
var checkElement = function(el) { | |
if(el) { | |
window['Base'].CurrentElement = el; |
This file contains hidden or 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
root = true | |
[*] | |
charset = utf-8 | |
end_of_line = lf | |
indent_size = 2 | |
indent_style = space | |
insert_final_newline = true | |
trim_trailing_whitespace = true |
This file contains hidden or 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
using System; | |
public static class GuidUtils | |
{ | |
public static Guid FromInt64(params long[] f) | |
{ | |
byte[] result = new byte[16]; | |
BitConverter.GetBytes (f [0]).CopyTo (result, 0); | |
BitConverter.GetBytes (f [1]).CopyTo (result, 8); |
This file contains hidden or 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
ln -s /dev/null /var/lib/lxc/mycontainer/rootfs/etc/systemd/system/console-getty.service |
This file contains hidden or 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 ldap3 import Connection, Server | |
import getpass | |
SERVER = '127.0.0.1' | |
SEARCH = 'cn=%s,cn=Users,dc=example,dc=com' % input('Username: ') | |
PASSWD = getpass.getpass() | |
with Connection(Server(SERVER, use_ssl=True), SEARCH, PASSWD, auto_bind=True) as conn: | |
print(conn) | |
conn.unbind() |
This file contains hidden or 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 | |
// Arquivo 'inc/session.class.php' | |
// Edite a função 'haveRight' para que ela fique similar ao exemplo abaixo | |
static function haveRight($module, $right) { | |
global $DB; | |
//If GLPI is using the slave DB -> read only mode | |
if ($DB->isSlave() | |
&& ($right & (CREATE | UPDATE | DELETE | PURGE))) { |
This file contains hidden or 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
SVCNAME=sybase9-mydb | |
DBNAME=MYDB | |
DBPORT=2638 | |
DBPATH=/srv/db | |
INITCACHE=2G | |
LOWCACHE=8G | |
UPCACHE=16G |
This file contains hidden or 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/python3 | |
# Remember to install the pyBotTelegramAPI package (usually from pip) | |
# It should works with Python 3.4 and above | |
import telebot, socket, subprocess, sys | |
BOT_TOKEN='<YOUR BOT TOKEN>' | |
DESTINATION='<DESTINATION ID>' |
This file contains hidden or 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
WScript.CreateObject("WScript.Shell").Run "wsl ~ -d Ubuntu -e /bin/bash -c ""DISPLAY=:0 xrdb ~/.Xresources && DISPLAY=:0 xst""", 0, false |
This file contains hidden or 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/sh | |
AGENT=/mnt/c/tools/weasel-pageant/weasel-pageant | |
PROFILE=~/.cache/.ssh-agent | |
mkdir -p "$(dirname "$PROFILE")" && touch $PROFILE | |
source $PROFILE &> /dev/null | |
if [ ! -e "$SSH_AUTH_SOCK" ] | |
then | |
$AGENT > $PROFILE |
OlderNewer