The files we need to build a basic root filesystem with Yocto. These are the support files for a YouTube video
#!/bin/bash
DISTRO="buster"
# download the GPG key of the repository:
wget -q0 - http://downloads.linux.hpe.com/SDR/repo/mcp/GPG-KEY-mcp | apt-key add -
# create apt sources file for HP/Proliant repo
echo -e "deb http://downloads.linux.hpe.com/SDR/repo/mcp/ $DISTRO/current non-free" > /etc/apt/sources.list.d/proliant.sources.list
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 boto3 | |
| ''' | |
| This gist is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. | |
| This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. | |
| You should have received a copy of the GNU General Public License along with this program. If not, see <https://www.gnu.org/licenses/>. | |
| ''' |
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
| default['sshd']['sshd_config']['AuthenticationMethods'] = 'publickey,keyboard-interactive:pam' | |
| default['sshd']['sshd_config']['ChallengeResponseAuthentication'] = 'yes' | |
| default['sshd']['sshd_config']['PasswordAuthentication'] = 'no' |
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 python | |
| import sys | |
| def read_smaps(pidlist): | |
| try: | |
| print("PID\tRSS\tSHARED\t\tNONE_SHARED") | |
| mem = lambda t, f: int(f[1]) if f[0] == '%s:' % t else 0.0 | |
| for pid in pidlist: | |
| filename = "/proc/%s/smaps" % pid |
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
| class AndroidXMLDecompress(): | |
| endDocTag = 0x00100101 | |
| startTag = 0x00100102 | |
| endTag = 0x00100103 | |
| def decompressXML(self, xml: bytearray) -> str: | |
| finalXml = str() | |
| numbStrings = self.LEW(xml, 4*4) |
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
| """ | |
| Convert YouTube subtitles(vtt) to human readable text. | |
| Download only subtitles from YouTube with youtube-dl: | |
| youtube-dl --skip-download --convert-subs vtt <video_url> | |
| Note that default subtitle format provided by YouTube is ass, which is hard | |
| to process with simple regex. Luckily youtube-dl can convert ass to vtt, which | |
| is easier to process. |
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
| [user] | |
| name = Brad Wilson | |
| email = dotnetguy@gmail.com | |
| signingkey = 0B7BD15AD1EC5FDE | |
| [alias] | |
| a = add -A | |
| abort = rebase --abort | |
| amend = commit --amend -C HEAD | |
| bclean = "!f() { git switch ${1-main} && git branch --merged ${1-main} | grep -v ${1-main}$ | xargs git branch -d; }; f" | |
| bdone = "!f() { git switch ${1-main} && git up && git bclean ${1-main}; }; f" |
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
| // host will be passed in the groovy bindings for extended choice plugin. | |
| def getVersion = { host, path -> | |
| try { | |
| def version = new groovy.json.JsonSlurper().parse(new URL("https://${host}${path}")).version | |
| return version | |
| } catch(Exception e) { | |
| return null | |
| } | |
| } |
- command line values (for example, -u my_user, these are not variables)
- role defaults (defined in role/defaults/main.yml)
- inventory file or script group vars
- inventory group_vars/all
NewerOlder