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/sh | |
# /etc/rc.d/rc.inet1 | |
# This script is used to bring up the various network interfaces. | |
# | |
# @(#)/etc/rc.d/rc.inet1 10.2 Sun Jul 24 12:45:56 PDT 2005 (pjv) | |
# Adapted by Bergware for use in unRAID - April 2016 | |
# - improved interface configuration | |
# - added VLAN (sub-interface) support | |
# - removed wireless (unsupported) |
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 | |
# | |
# Generates a PBKDF2 hash for qBittorrent WebUI password. This is useful for setting the password in the config file. | |
# | |
# NOTE: Hashing algorithm must match https://github.com/qbittorrent/qBittorrent/blob/master/src/base/utils/password.cpp | |
# | |
# Usage: python qbittorrent_hash.py | |
# | |
# Author: Beau Hastings (https://github.com/hastinbe) | |
# Date: 2024-01-09 |
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 'package:architecture_playground/home_page.dart'; | |
import 'package:architecture_playground/services.dart'; | |
import 'package:flutter/material.dart'; | |
void main() async { | |
// perform long-running tasks before "runApp" to display the native splash screen | |
final services = await Services.initialize(); | |
runApp(ServicesProvider( | |
services: services, |
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 | |
class Singleton | |
{ | |
private static $instance; | |
public static function getInstance() | |
{ | |
if (static::$instance === null) { | |
static::$instance = new static(); |
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 | |
const BOOT_ADDRESS = 0xd34db33f; | |
const BOOT_SECTOR = 0x7c; | |
const SECTOR_SIZE = 4096; | |
interface IComputer | |
{ | |
public function powerOn(); | |
public function powerOff(); |
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 | |
interface IGreeting | |
{ | |
public function greeting(); | |
} | |
abstract class GreetingDecorator implements IGreeting | |
{ | |
protected $greeter; |
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 | |
abstract class Component | |
{ | |
protected $_parent; | |
protected $_children; | |
public function __construct() | |
{ | |
$this->_children = new SplDoublyLinkedList(); | |
} |
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 | |
abstract class Window | |
{ | |
protected $impl; | |
public function __construct(WindowImpl $impl) | |
{ | |
$this->setWindowImpl($impl); | |
} |
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 | |
interface Database {} | |
class Mysql implements Database {} | |
class Postgresql implements Database {} | |
class Container | |
{ | |
protected $bindings = []; |
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 | |
/** | |
* GPS helper class. | |
* | |
* @package Gps | |
* | |
* @author Beau Hastings <[email protected]> | |
* @copyright 2019 Beau Hastings | |
* @license GNU GPL v2 | |
* |
NewerOlder