Skip to content

Instantly share code, notes, and snippets.

View redcap3000's full-sized avatar
💭
NONE

Ronaldo Barbachano redcap3000

💭
NONE
View GitHub Profile
@redcap3000
redcap3000 / petals.service
Last active September 10, 2023 17:38
Petals Server Installation for Ubuntu Server 22.04 Minimum
[Service]
Type=simple
Restart=always
RestartSec=1
User=llamaLab
Environment=PYTORCH_CUDA_ALLOC_CONF=max_split_size_mb:128
Environment=CUDA_VISIBLE_DEVICES=0
ExecStartPre=/bin/sleep 30
ExecStart=/home/llamaLab/anaconda3/bin/python -m petals.cli.run_server petals-team/StableBeluga2 --cache_dir /mnt/BigCache/.pCache --attn_cache_tokens 12328 --max_disk_space 1000GB --num_blocks 16 --public_name redcap3000 --port 31331
KillSignal=SIGINT
@redcap3000
redcap3000 / folding_deb_at_home.sh
Created March 18, 2020 00:04
Commands to install and configure FAHClient in addition to basic control commands of FAHClient from within a screen session.
## Intended for installation on a mining os such as HiveOS but should be applicable to all linux os'es with small changes to step 1.
## Some parts of script may be added to startup areas.
## Wrote this because advice for using FAHClient without a gui was 'for advanced users.' Its not! Hopefully some miners who are feeling
## generous can use this to have their rigs do some folding for COVID-19 and this should make it that much less painful.
## STEP 1) download and install fahclient 7.5.1
cd ~
wget https://download.foldingathome.org/releases/public/release/fahclient/debian-stable-64bit/v7.5/fahclient_7.5.1_amd64.deb
dpkg -i fahclient_7.5.1_amd64.deb
@redcap3000
redcap3000 / nodejs-custom-version-openshift-installer.sh
Last active December 15, 2015 19:29
File that loads git://github.com/openshift/nodejs-custom-version-openshift.git in to an openshift app repo. Supply with path to existing openshift repo, or move script into repo root
#!/bin/bash
## Nodejs custom version installer
##
## Ronaldo Barbachano April 2013
## Based on the openshift/nodejscustom-version-openshift repo
##
## Supply with path to existing openshift repo, or move script into
## repo root.
##
## Probably less headaches if this is run immediately after
@redcap3000
redcap3000 / call_site.c
Created April 9, 2012 08:08
G-WAN Site Loader/API Interface
// ============================================================================
// This is a Servlet sample for the G-WAN Web Server (http://www.trustleap.com)
// ----------------------------------------------------------------------------
// Ronaldo Barbachano 4-6-2012
// call_site.c:
// Loads a website and passes a generated URI/URL. Shows usage of
// xbuf_frurl() and get_arg() and custom function call_site().
// Use this to call on API's, mirror sites, etc.
// call_site( char * http host, char * uri/url,
// char *extra appended value, buf_t)
@redcap3000
redcap3000 / json_load.c
Created April 7, 2012 02:49
JSON/File Loader for G-WAN
// ============================================================================
// This is a Servlet sample for the G-WAN Web Server (http://www.trustleap.com)
// ----------------------------------------------------------------------------
// json_load.c: example uses loadfile.c to load a json text file into the buffer
// Ronaldo Barbachano 4-6-12
// ----------------------------------------------------------------------------
#include "gwan.h" // G-WAN exported functions
#include <string.h>
int main(int argc, char *argv[])
@redcap3000
redcap3000 / number_base.php
Created October 28, 2011 19:51
Number Base Conversion Helper
<?php
// Ronaldo Barbachano October 2011
// Created out of a need to compress integer values in couch databases. Php 5.3 will allow up to 36 bit bases,
// which results in the smallest integer representation.
//To convert to default base, of 8, just provide
// number_base::number_convert(1);
// encodes 1 into base 32 number
// number_base::num_convert(1,32);
{
"lockerHost" : "localhost",
"lockerPort" : 8042,
"me" : "Me",
"scannedDirs" : [
"Apps",
"Collections",
"Connectors"
],
"mongo" : {