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/bash | |
| # LibreOffice headless server script | |
| # | |
| # chkconfig: 2345 80 30 | |
| # description: headless openoffice server script | |
| # processname: libreoffice | |
| # | |
| # Author: Vic Vijayakumar | |
| # Modified by Federico Ch. Tomasczik | |
| # and then by Mark Pavlichuk |
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 Gists to store code you would like to remember later on | |
| console.log(window); // log the "window" object to the console |
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
| no-resolv | |
| resolv-file=/etc/resolv.dnsmasq.conf | |
| interface=docker0 | |
| dhcp-range=172.17.42.64,172.17.42.126 | |
| dhcp-no-override | |
| # dhcp-leasefile=/etc/dnsmasq.d/default.leases | |
| dhcp-lease-max=127 | |
| dhcp-host=52:54:00:29:94:d0,my-filer,172.17.42.80,12h | |
| dhcp-option=option:domain-search,site | |
| dhcp-script=/usr/bin/update-docker-dns.sh |
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
| DHCPACTION (ACK|DECLINE|DISCOVER|INFORM|NAK|OFFER|RELEASE|REQUEST) | |
| DHCPGATEWAY %{IPV4:dhcp_gateway_ip} | |
| DHCPMESSAGE ((:)%{SPACE}%{GREEDYDATA:dhcp_message})? | |
| DHCPIPORMAC ((%{IPV4:dhcp_client_ip})|(%{COMMONMAC:dhcp_client_mac})) | |
| DHCPD (?:%{SYSLOGTIMESTAMP:timestamp}|%{TIMESTAMP_ISO8601:timestamp8601})%{SPACE}%{DHCPACTION:dhcp_action}%{SPACE}(for|on|from|to)%{SPACE}%{DHCPIPORMAC}%{SPACE}((from|to)%{SPACE})?%{DHCPIPORMAC}?(\(%{DHCPIPORMAC}\))?%{SPACE}(\(%{USER:user_machine}\))?%{SPACE}?(via|from)%{SPACE}((%{DHCPGATEWAY}%{DHCPMESSAGE})|%{USERNAME:dhcp_client_interface}) | |
| DHCPIPSUBNET (?<![0-9])(?:(?:25[0-5]|2[0-4][0-9]|[0-1]?[0-9]{1,2})[.](?:25[0-5]|2[0-4][0-9]|[0-1]?[0-9]{1,2})[.](?:25[0-5]|2[0-4][0-9]|[0-1]?[0-9]{1,2}))[\/]%{INT} | |
| DHCPDDUP (%{IPV4:dhcp_client_ip})%{GREEDYDATA}(%{COMMONMAC:dhcp_client_mac})%{GREEDYDATA}(%{DHCPIPSUBNET:dhcp_subnet}) | |
| DHCPDINFO %{GREEDYDATA:dhcp_message} | |
| DHCPDPOOL pool (%{GREEDYDATA:dhcp_pool})(%{DHCPIPSUBNET:dhcp_subnet})%{GREEDYDATA:dhcp_message} |
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 os import listdir, setgid, setuid | |
| from subprocess import call | |
| import psycopg2 | |
| # We run the sql as the postgres user | |
| setgid(104) | |
| setuid(109) | |
| conn = psycopg2.connect("user=postgres") | |
| cur = conn.cursor() |
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
| select alf_content_url.content_url | |
| from alf_node | |
| left join alf_qname on alf_node.type_qname_id = alf_qname.id | |
| left join alf_node_properties on alf_node_properties.node_id = alf_node.id | |
| join alf_content_data on alf_content_data.id = alf_node_properties.long_value | |
| left join alf_content_url on alf_content_url.id = alf_content_data.content_url_id | |
| where | |
| alf_qname.local_name = 'dictionaryModel' | |
| and alf_content_url.content_url is not null |
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
| /** | |
| * Summary. Attempts to fix metadata that is in the Alfresco Repo. | |
| * @param {object} args | |
| */ | |
| const invalidArg = function (message) { | |
| status.code = 400 | |
| status.message = message | |
| status.redirect = 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
| #!/usr/bin/env python3 | |
| # -*- coding: utf-8 -*- | |
| import argparse, sys, re, signal | |
| from subprocess import call | |
| parser = argparse.ArgumentParser() | |
| parser.add_argument("--file", help="The log file to parse.") | |
| parser.add_argument( | |
| "--notest", help="Use --notest to finally rename the files.", action="store_true") | |
| parser.add_argument("--printtest", help="Just print out line contents") |
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
| import java.io.File | |
| import org.apache.poi.ss.usermodel.WorkbookFactory | |
| import org.apache.poi.ss.usermodel.{Row, Cell} | |
| val baseUnitFile = new File("./BaseUnits_export_.xlsx") | |
| var workbook = WorkbookFactory.create(baseUnitFile) | |
| val sheet = workbook.getSheetAt(0) | |
| val xmlTemplate = (DevName: Cell, IP: Cell) => <MirrorOp> | |
| <Device> |
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/bash | |
| export project=$1 | |
| export pathOfProject=$2 | |
| mkdir -p "./$project" | |
| # find data/B8493 -type f -printf '%h\n' | sort -u | |
| echo "Empty Dirs" |
OlderNewer