Skip to content

Instantly share code, notes, and snippets.

Avatar
🍬

Travis Davis TravisDavis-ops

🍬
View GitHub Profile
@TravisDavis-ops
TravisDavis-ops / The-FrontEnd.html
Created Nov 18, 2021
BadCode [ Legit ] [ Juior Code ]
View The-FrontEnd.html
<link href="https://cdn.jsdelivr.net/gh/gitbrent/bootstrap4-toggle@3.4.0/css/bootstrap4-toggle.min.css" rel="stylesheet">
<link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/npm/css-toggle-switch@latest/dist/toggle-switch.css" />
<style>
.grid-container {
display: grid;
grid-template-columns: 1fr 1fr 1fr 1fr;
grid-gap: 2rem;
grid-auto-rows: auto;
}
View mkGogPackage.nix
{ binName, installerName, pname, version, sha256, fixup? "", meta ? { }, }:
{ stdenv, requireFile, zip, unzip, makeWrapper, steam-run }:
stdenv.mkDerivation {
name = "${pname}-${version}";
src = requireFile {
inherit sha256;
name = "${installerName}_${version}.sh";
message = ''
Please purchase the game on gog.com and download the linux installer.
once you have downloaded the file, please use the following command and re-run the installation:
@TravisDavis-ops
TravisDavis-ops / default.nix
Created Aug 24, 2021
nix build script for bomabadil
View default.nix
{ lib, rustPlatform, fetchFromGitHub }:
rustPlatform.buildRustPackage rec {
pname = "toml-bombadil";
version = "2.0.0";
cargoLock = {
lockFile = ./Cargo.lock;
};
src = fetchFromGitHub {
owner = "oknozor";
repo = pname;
@TravisDavis-ops
TravisDavis-ops / default.nix
Created Aug 8, 2021
My First Package ever
View default.nix
with import <nixos>{};
rustPlatform.buildRustPackage rec {
pname = "toml-bombadil";
version = "2.0.0";
src = fetchCrate{
inherit pname version;
sha256 = "sha256-6V7vx1xcO4Y2hl5XjQenhiddUpVRAZtzSM/2+8K2iEw=";
};
View arduino15.log
time="2021-07-06T18:17:09-05:00" level=info msg="Using config file: /home/tod/.arduino15/arduino-cli.yaml"
time="2021-07-06T18:17:09-05:00" level=info msg="arduino-cli version 0.18.3-arch"
time="2021-07-06T18:17:09-05:00" level=info msg="Checking signature" index=/home/tod/.arduino15/package_index.json signatureFile=/home/tod/.arduino15/package_index.json.sig trusted=true
time="2021-07-06T18:17:09-05:00" level=info msg="Checking signature" error="opening signature file: open /home/tod/.arduino15/package_esp8266com_index.json.sig: no such file or directory" index=/home/tod/.arduino15/package_esp8266com_index.json signatureFile=/home/tod/.arduino15/package_esp8266com_index.json.sig
time="2021-07-06T18:17:09-05:00" level=info msg="Checking if CLI is Bundled into the IDE"
time="2021-07-06T18:17:09-05:00" level=info msg="Loading hardware from: /home/tod/.arduino15/packages"
time="2021-07-06T18:17:09-05:00" level=info msg="Loading package arduino from: /home/tod/.arduino15/packages/arduino/hardware"
time="2021-07-0
View arduino-cli.log
time="2021-07-05T18:11:44-05:00" level=info msg="Using config file: /home/tod/.arduino15/arduino-cli.yaml"
time="2021-07-05T18:11:44-05:00" level=info msg="arduino-cli version 0.18.3-arch"
time="2021-07-05T18:11:45-05:00" level=info msg="Checking signature" index=/home/tod/.arduino15/package_index.json signatureFile=/home/tod/.arduino15/package_index.json.sig trusted=true
time="2021-07-05T18:11:45-05:00" level=info msg="Checking signature" error="opening signature file: open /home/tod/.arduino15/package_esp8266com_index.json.sig: no such file or directory" index=/home/tod/.arduino15/package_esp8266com_index.json signatureFile=/home/tod/.arduino15/package_esp8266com_index.json.sig
time="2021-07-05T18:11:45-05:00" level=info msg="Checking if CLI is Bundled into the IDE"
time="2021-07-05T18:11:45-05:00" level=info msg="Loading hardware from: /home/tod/.arduino15/packages"
time="2021-07-05T18:11:45-05:00" level=info msg="Loading package arduino from: /home/tod/.arduino15/packages/arduino/hardware"
time="2021-07-0
View UetNumberthing.php
<?php
if(!function_exists('str_contains')){
function str_contains($haystack, $needle){
return $needle !== '' && mb_strpos($haystack, $needle) !== false;
}
}
class UETechNumber_model extends CI_Model {
private $db;
public function __construct(){
$this->db = $this->load->database('MOADB_BE', true, true);
View main.py
class Archiver(Thread):
def __init__(self, idx, *args, **kwargs):
super().__init__(*args, **kwargs)
self.idx = idx
def run(self):
db = QueryBuilder('main')
urls = [url for (_, url, _, _) in db.select('*')
.where('id', self.idx)
@TravisDavis-ops
TravisDavis-ops / youtube-dl-cron.sh
Created May 1, 2021 — forked from vmassuchetto/youtube-dl-cron.sh
Shell script cron job to download YouTube videos from your subscription feed
View youtube-dl-cron.sh
#!/bin/bash
#
# Script to keep downloading YouTube videos to your computer using youtube-dl:
# http://rg3.github.io/youtube-dl/
#
# Put it to work:
#
# sudo wget "https://gist.github.com/vmassuchetto/10338703/raw" -O /etc/cron.hourly/youtube-dl-cron.sh
# sudo chmod +x /etc/cron.hourly/youtube-dl-cron.sh