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
server: | |
tls-cert-bundle: /etc/ssl/certs/ca-certificates.crt | |
qname-minimisation: yes | |
interface: eth0 | |
access-control: 192.168.0.0/16 allow | |
logfile: "/var/log/unbound.log" | |
use-syslog: no | |
do-ip6: no | |
prefetch: yes | |
cache-max-ttl: 14400 |
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
SELECT | |
t.table_schema | |
, t.table_name | |
, c.column_name | |
, c.data_type | |
, CASE | |
WHEN c.character_maximum_length IS NOT NULL THEN c.character_maximum_length | |
ELSE c.numeric_precision | |
END AS max_length | |
, is_nullable |
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
find . -iname '*.mp3' -print0 | sort -zn | xargs -0 -I '{}' lame --decode '{}' | lame --tt "Title" --ta "Artist" --tl "Title" -b 32 - concat2.mp3 |
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
df['Total $'].replace('[^.0-9]', '', regex=True).astype(float) |
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
import socket | |
print('host name', socket.gethostname()) | |
print('host ip adddress', socket.gethostbyname(socket.gethostname())) |
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
// Chrome version | |
javascript: (function() { | |
let text = '[' + document.title + '](' + location.href + ')'; | |
navigator.clipboard.writeText(text) | |
.then(() => { | |
console.log('Text copied to clipboard: ', text); | |
}) | |
.catch(err => { | |
console.error('Could not copy text: ', err); | |
}); |
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
# count the number of commas in a file and print if the number of commas is different than expected | |
import argparse | |
parser = argparse.ArgumentParser() | |
parser.add_argument("filename", help="filename") | |
parser.add_argument("commas", help="number of expected commas", type=int) | |
args = parser.parse_args() | |
file = args.filename | |
number_commas = int(args.commas) |
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 | |
$sf_config = array( | |
client_id => '', // from salesforce OAuth configuration (add new app ...) | |
client_secret => '', | |
username => '', // username login to salesforce | |
password => '', // no need to concat password token | |
url => 'https://login.salesforce.com/services/oauth2/token', | |
grant_type => 'password', | |
query_srv_url => '/services/data/v20.0/query/' |
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
<apex:page standardController="Account" showHeader="false" sidebar="false" standardStylesheets="false"> | |
<script src="//cdnjs.cloudflare.com/ajax/libs/jsforce/1.7.0/jsforce.min.js"></script> | |
<script src="//cdnjs.cloudflare.com/ajax/libs/vue/1.0.26/vue.js"></script> | |
<h1>Using jsforce and Vue Js</h1> | |
<div id="app"> | |
<label> | |
Filter by name: | |
<input v-model="name" /> |
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
#Sample provided As-Is – Use after sufficient testing. | |
#replace these details – User name, domain, Password. (Also consider using Get-Credential to enter password securely as script runs) | |
#Ensure there is a folder called C:\OUTPUT | |
#from https://blogs.technet.microsoft.com/sharepointrecipes/2015/06/17/code-sample-spo-dump-out-list-items-to-csv/ | |
$username = "[email protected]" | |
$password = "pwd" | |
$url = "https://domain.sharepoint.com" |
NewerOlder