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
| # RAID5 Rebuild — Adding a Replacement Disk to a Degraded Array | |
| ## Ground rules | |
| - Run commands **one at a time**. Do not paste blocks. | |
| - Read each command back before pressing enter. | |
| - Nothing here writes to the existing array members. The **only** dangerous command is | |
| `sgdisk --replicate` with its arguments reversed. Stage 0 exists to make that recoverable. | |
| - Identify disks by **serial**, not by letter. Letters can shuffle across reboots. | |
| - The rebuild runs in the kernel. Closing SSH does not stop it. It also survives a reboot |
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 | |
| set -e | |
| echo "🚀 Startup script running..." | |
| NVME_DISK="/dev/nvme1n1" | |
| MOUNT_POINT="/mnt/nvme" | |
| S3_BUCKET="ep-ai-us-east-1" | |
| MODEL_DIR="/mnt/nvme/models" | |
| MODEL_PATH="/mnt/nvme/models/DeepSeek-R1-GGUF/DeepSeek-R1-UD-IQ1_S/DeepSeek-R1-UD-IQ1_S-00001-of-00003.gguf" |
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 add-apt-repository "deb http://archive.canonical.com/ $(lsb_release -sc) partner" | |
| sudo apt-get update | |
| sudo apt-get install skype |
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
| "jenkins": { | |
| "jobs": { | |
| "Test Chef integration - production stack": { | |
| "description": "Production version of web stack", | |
| "variable1": "value1", | |
| "variable2": "value2", | |
| "variable3": "value3", | |
| }, | |
| "Test jenkins job": { | |
| "description": "Development version of web stack", |
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 DBInterfaceMeta(type): | |
| # we use __init__ rather than __new__ here because we want | |
| # to modify attributes of the class *after* they have been | |
| # created | |
| def __init__(cls, name, bases, dct): | |
| if not hasattr(cls, 'registry'): | |
| # this is the base class. Create an empty registry | |
| print "Inside if"+str(cls) | |
| print name | |
| print bases |
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 Foo(object): | |
| inherited_classes = [] | |
| fields = {} | |
| @classmethod | |
| def add_me(cls, subcls): | |
| cls.inherited_classes.append(subcls) | |
| print cls.inherited_classes | |
| @classmethod | |
| def add_field(cls, id_key) | |
| fields[cls] = id_key |
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 tsheets.model import Model | |
| class User(Model): | |
| Model.add_field('id', 'int') | |
| Model.add_field('username', 'str') | |
| Model.add_field('email', 'str') |
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 Model(object): | |
| accessors = {} | |
| def __init__(self, hash = None, options = {}): | |
| self._dynamic_accessors = [] | |
| if hash: | |
| self.__class__.mass_assign(self, hash, {}) | |
| @classmethod | |
| def add_field(cls, fname, type_f, options={}): |
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 TSheets::Repos::Users < TSheets::Repository | |
| url "/users" | |
| model TSheets::Models::User | |
| actions :list, :add, :edit | |
| filter :ids, [ :integer ] | |
| filter :usernames, [ :string ] | |
| filter :active, :boolean | |
| filter :first_name, :string | |
| filter :last_name, :string | |
| filter :modified_before, :datetime |
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
| require 'date' | |
| class TSheets::Repository | |
| attr_accessor :bridge, :cache | |
| @@allowed_classes_for_spec = { | |
| boolean: [ ::TrueClass, ::FalseClass ], | |
| integer: [ ::Fixnum ], | |
| string: [ ::String, ::Symbol ], | |
| date: [ ::Date, ::DateTime ], |
NewerOlder