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 | |
| function linuxconfig_textbox( $atts, $content = null ) { | |
| $defaults = array( | |
| "title" => "This is the box title", | |
| "type" => "warning" | |
| ); | |
| $parsed_atts = shortcode_atts( $defaults, $atts ); | |
| if ( ! in_array( $parsed_atts['type'], array( "warning", "success", "danger" ) ) ) { |
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
| dbus-send --system --print-reply \ | |
| --dest=org.freedesktop.Accounts \ | |
| /org/freedesktop/Accounts/User1000 \ | |
| org.freedesktop.Accounts.User.SetIconFile string:/path/to/image.jpg |
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
| { | |
| "policies": { | |
| "DisableSetDesktopBackground": true, | |
| "DisableTelemetry": true, | |
| "EnableTrackingProtection": { | |
| "Value": true | |
| }, | |
| "NoDefaultBookmarks": true, | |
| "OfferToSaveLogins": false, | |
| "Extensions": { |
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
| --- | |
| dependency: | |
| name: galaxy | |
| driver: | |
| name: docker | |
| platforms: | |
| - name: instance | |
| image: geerlingguy/docker-fedora36-ansible:latest | |
| command: /lib/systemd/systemd | |
| volumes: |
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
| document.addEventListener('DOMContentLoaded', function() { | |
| 'use strict'; | |
| const konami_code = [ 'ArrowUp', 'ArrowUp', 'ArrowDown', 'ArrowDown', 'ArrowLeft', 'ArrowRight', 'ArrowLeft', 'ArrowRight', 'b', 'a']; | |
| let konami_position = 0; | |
| document.addEventListener('keydown', function (event) { | |
| if (konami_code[konami_position] == event.key) { | |
| konami_position += 1; | |
| if (konami_position == konami_code.length) { |
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 | |
| # The command specified in a RETURN trap is executed each time | |
| # a shell function or a script executed with the . or source builtins | |
| # finishes executing. By default, the RETURN trap is not inherited: | |
| sayhi() { | |
| echo "Hi!" | |
| } | |
| main() { |
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 | |
| import requests | |
| # steam must be True, otherwise the content will be downloaded all at once | |
| with requests.get("https://cdn.kernel.org/pub/linux/kernel/v5.x/linux-5.0.7.tar.xz", stream=True) as response: | |
| with open("latest-kernel.tar.xz", "wb") as tarball: | |
| # iter_content method iterates over response content | |
| # the argument is chunk_size | |
| for chunk in response.iter_content(16384): | |
| tarball.write(chunk) |
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 | |
| # Basic example of how to use i3lock to lock the screen when system goes to sleep | |
| import subprocess | |
| from pydbus import SystemBus | |
| from gi.repository import GLib | |
| def onSuspend(value): | |
| # When suspending or hibernating the system, "value" will be True | |
| if 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
| rd.plymouth=0 plymouth.enable=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
| 'ACTION=="add", ATTRS{device}=="0x0250", ATTRS{vendor}=="0x197b", RUN+="/usr/sbin/ethtool -s ens5f5 speed 100 duplex full autoneg on"' |
NewerOlder