Skip to content

Instantly share code, notes, and snippets.

View mldk-tech's full-sized avatar

MLDK | David Kochav mldk-tech

View GitHub Profile
@mldk-tech
mldk-tech / gist:5ce7258de64fab8466b6cf3330107fb2
Created August 3, 2023 08:59 — forked from mberman84/gist:45545e48040ef6aafb6a1cb3442edb83
LLaMA 2 13b chat fp16 Install Instructions
conda create -n textgen python=3.10.9
conda activate textgen
install pytorch: pip3 install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu117
git clone https://github.com/oobabooga/text-generation-webui
cd text-generation-webui
pip install -r requirements.txt
python server.py
# download model
# refresh model list
# load model
@mldk-tech
mldk-tech / docker_wordpress.md
Created July 30, 2022 00:14 — forked from bradtraversy/docker_wordpress.md
Docker Compose FIle For Wordpress, MySQL & phpmyadmin

Wordpress & Docker

This file will setup Wordpress, MySQL & PHPMyAdmin with a single command. Add the code below to a file called "docker-compose.yaml" and run the command

$ docker-compose up -d

# To Tear Down
$ docker-compose down --volumes
@mldk-tech
mldk-tech / class.database.php
Created September 2, 2016 07:07 — forked from jonashansen229/class.database.php
PHP OOP Database class using MySQLI and Singleton pattern. Only one instance of the class will be made, this requires less memory.
<?php
/*
* Mysql database class - only one connection alowed
*/
class Database {
private $_connection;
private static $_instance; //The single instance
private $_host = "HOSTt";
private $_username = "USERNAME";
private $_password = "PASSWORd";
@mldk-tech
mldk-tech / imgur
Created August 29, 2016 12:55 — forked from vivien/imgur
Shell script to upload image(s) to imgur.com
#!/bin/sh
#
# Upload image(s) to imgur.com
# Copyright (C) 2014 Vivien Didelot <[email protected]>
# Licensed under GPL version 3, see http://www.gnu.org/licenses/gpl.txt
#
# Requires "jshon":
# http://kmkeen.com/jshon/
#
# Alternatives, which suck:
FROM gizra/drupal-lamp
ADD . /var/www/html/circuit/repository
WORKDIR /var/www/html/circuit/repository
# Add a bash script to finalize all
COPY docker_files/run.sh /var/www/html/circuit/repository/docker_files/run.sh
RUN chmod +x /var/www/html/circuit/repository/docker_files/run.sh
#ENTRYPOINT ["/var/www/html/circuit/repository/docker_files/run.sh"]
sudo apt-get update
sudo apt-get install -y build-essential chrpath libssl-dev libxft-dev
sudo apt-get install -y libfreetype6 libfreetype6-dev
sudo apt-get install -y libfontconfig1 libfontconfig1-dev
cd ~
export PHANTOM_JS="phantomjs-2.1.1-linux-x86_64"
wget https://github.com/Medium/phantomjs/releases/download/v2.1.1/$PHANTOM_JS.tar.bz2
tar xvjf $PHANTOM_JS.tar.bz2
mv $PHANTOM_JS /usr/local/share
ln -sf /usr/local/share/$PHANTOM_JS/bin/phantomjs /usr/local/bin
@mldk-tech
mldk-tech / gist:8c2faa7408081c9b6bfa
Created June 22, 2015 06:12
moment-map behat.local.yml file
default:
extensions:
Drupal\DrupalExtension:
drupal:
drupal_root: "http://dev-moment.pantheon.io/"
@mldk-tech
mldk-tech / gist:99c09288cc0a152d823b
Created March 30, 2015 14:54
Show issue number in terminal
`cd ~`
`gedit .bashrc`
enter to the end of file:
```
function parse_git_branch () {
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/ (\1)/'
}
RED="\[\033[0;31m\]"
@mldk-tech
mldk-tech / gist:0004f154bcae8b6bd226
Created April 30, 2014 09:10
no youtube videos
$node_result = $query->entityCondition('entity_type', 'node')
->entityCondition('bundle', 'video')
->propertyCondition('status', NODE_PUBLISHED)
->range(0,$number_of_pages * $carousel_counter)
if(uppercut_general_is_landing_page()) {
$query->fieldCondition('field_youtube','value',0)
}
->addTag('random')
->execute();