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
// IMPORTANT: Start your code on the 2nd line | |
var {classes:Cc,interfaces:Ci,utils:Cu} = Components; | |
/* set new tab page */ | |
try { | |
Cu.import("resource:///modules/AboutNewTab.jsm"); | |
var newTabURL = "/Users/....startpages/index.html"; | |
AboutNewTab.newTabURL = newTabURL; | |
} catch(e){Cu.reportError(e);} // report errors in the Browser 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
import requests | |
import bs4 | |
my_recipes = 'https://cookidoo.fr/organize/fr-FR/my-recipes' | |
book = 'https://cookidoo.fr/organize/fr-FR/api/bookmark' | |
cookies = 'XXX' | |
while True: | |
print("===") | |
r = requests.get(my_recipes, headers={'Cookie': cookies}) |
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
pacmd list-sinks | grep name: | |
pacmd load-module module-remap-sink sink_name=mono master=<name_of_audio sink_given_by_previous_command> channels=2 channel_map=mono,mono | |
speaker-test -c 2 -t sine |
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
SOURCEDIR = diags | |
BUILDDIR = png | |
BLOCKDIAG_SOURCES = $(wildcard $(SOURCEDIR)/*.blockdiag) | |
SEQDIAG_SOURCES = $(wildcard $(SOURCEDIR)/*.seqdiag) | |
ACTDIAG_SOURCES = $(wildcard $(SOURCEDIR)/*.actdiag) | |
NWDIAG_SOURCES = $(wildcard $(SOURCEDIR)/*.nwdiag) | |
BLOCKDIAG_GENERATED = $(patsubst $(SOURCEDIR)/%.blockdiag, $(BUILDDIR)/%.png, $(BLOCKDIAG_SOURCES)) | |
SEQDIAG_GENERATED = $(patsubst $(SOURCEDIR)/%.seqdiag, $(BUILDDIR)/%.png, $(SEQDIAG_SOURCES)) |
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
$vmlog = 'C:\Program Files\vmlogs\vmenv.log' | |
$getenv = "C:\Program Files\VMware\VMware Tools\vmtoolsd.exe" --cmd="info-get guestinfo.ovfEnv" > "C:\Program Files\vmlogs\vmenv.xml" | |
Invoke-Expression -Command $getenv | |
[xml]$vmenv = Get-Content $vmenvxml | |
$vmIP = $vmenv.Environment.PropertySection.Property | ?{ $_.key -like 'ip_address' } | select -expand value | |
$vmNetmask = $vmenv.Environment.PropertySection.Property | ?{ $_.key -like 'netmask' } | select -expand value | |
$vmGW = $vmenv.Environment.PropertySection.Property | ?{ $_.key -like 'default_ateway' } | select -expand value |
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
# ============LICENSE_START======================================================= | |
# org.onap.dcae | |
# ================================================================================ | |
# Copyright (c) 2018 Cisco Systems. All rights reserved. | |
# ================================================================================ | |
# Licensed under the Apache License, Version 2.0 (the "License"); | |
# you may not use this file except in compliance with the License. | |
# You may obtain a copy of the License at | |
# | |
# http://www.apache.org/licenses/LICENSE-2.0 |
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
https://stedolan.github.io/jq/manual/ | |
https://stedolan.github.io/jq/tutorial/ | |
http://hyperpolyglot.org/json | |
http://andrew.gibiansky.com/blog/command-line/jq-primer/ | |
http://arjanvandergaag.nl/blog/wrestling-json-with-jq.html | |
http://programminghistorian.org/lessons/json-and-jq | |
http://kamicut.cc/2014/11/19/using-jq-nested-objects.html |
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 Vincent Bernat | |
# (-s0 not useful, just an habit) | |
ssh http://some.remote.host tcpdump -pni eth0 -s0 -w - -U port 8888 | wireshark -k -i - |
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
sudo salt '*' pkg.mod_repo base enabled=1 name='CentOS-$releasever - Base' mirrorlist='http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=os' gpgcheck=1 | |
sudo salt '*' pkg.mod_repo update enabled=1 name='CentOS-$releasever - Updates' mirrorlist='http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=updates' gpgcheck=1 | |
sudo salt '*' pkg.mod_repo epel enabled=1 name='Extra Packages for Enterprise Linux 7 - $basearch' mirrorlist='https://mirrors.fedoraproject.org/metalink?repo=epel-7&arch=$basearch' gpgcheck=1 | |
sudo salt '*' pkg.mod_repo epel-testing enabled=1 name='Extra Packages for Enterprise Linux 7 - Testing - $basearch' mirrorlist='https://mirrors.fedoraproject.org/metalink?repo=testing-epel7&arch=$basearch' gpgcheck=1 |
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
img_url="http://cloud-images.ubuntu.com/releases/xenial/release" | |
img_url="${img_url}/ubuntu-16.04-server-cloudimg-amd64-disk1.img" | |
wget $img_url -O disk.img.dist | |
cat > my-user-data <<EOF | |
#cloud-config | |
password: changeme | |
chpasswd: { expire: False } | |
ssh_pwauth: True |
NewerOlder