Skip to content

Instantly share code, notes, and snippets.

Avatar

Symfony Developer sblmasta

View GitHub Profile
@sblmasta
sblmasta / gpu-performance.sh.desktop
Last active Jul 18, 2017
GPU Performance autorun ubuntu script
View gpu-performance.sh.desktop
[Desktop Entry]
Type=Application
Exec=/home/miner/gpu-performance.sh
Hidden=false
NoDisplay=false
X-GNOME-Autostart-enabled=true
Name[pl_PL]=Start GPU Performance
Name=Start GPU Perofrmance
Comment[pl_PL]=
Comment=
@sblmasta
sblmasta / init-mining.sh.desktop
Created Jul 18, 2017
Ubuntu Autostart script
View init-mining.sh.desktop
[Desktop Entry]
Type=Application
Exec=/home/miner/init-mining.sh
Hidden=false
NoDisplay=false
X-GNOME-Autostart-enabled=true
Name[pl_PL]=Start ETH Mining
Name=Start ETH Mining
Comment[pl_PL]=
Comment=
View xorg.conf
Section "ServerLayout"
Identifier "Layout0"
Screen 0 "Screen0" 0 0
Screen 1 "Screen1" 0 0
Screen 2 "Screen2" 0 0
Screen 3 "Screen3" 0 0
Screen 4 "Screen4" 0 0
Screen 5 "Screen5" 0 0
InputDevice "Keyboard0" "CoreKeyboard"
InputDevice "Mouse0" "CorePointer"
@sblmasta
sblmasta / start-eth-ethminer.sh
Created Jul 18, 2017
Ethminer run script for CUDA mining
View start-eth-ethminer.sh
#!/bin/bash
export GPU_FORCE_64BIT_PTR=0
export GPU_MAX_HEAP_SIZE=100
export GPU_USE_SYNC_OBJECTS=1
export GPU_MAX_ALLOC_PERCENT=100
export GPU_SINGLE_ALLOC_PERCENT=100
./ethminer/ethminer --cuda-parallel-hash 8 --farm-recheck 150 -U -S {pool address} -O {wallet}.RIG
View start-eth-claymore.sh
#!/bin/bash
export GPU_FORCE_64BIT_PTR=0
export GPU_MAX_HEAP_SIZE=100
export GPU_USE_SYNC_OBJECTS=1
export GPU_MAX_ALLOC_PERCENT=100
export GPU_SINGLE_ALLOC_PERCENT=100
./claymore/ethdcrminer64 -epool {pool address} -ewal {wallet}.RIG -epsw x -mode 1 -ftime 10
@sblmasta
sblmasta / init-mining.sh
Created Jul 18, 2017
Script which is running command after autologin after 15 seconds of delay
View init-mining.sh
#!/bin/bash
sleep 15 && gnome-terminal --geometry=170x45 --command "/home/miner/start-eth-claymore.sh"
@sblmasta
sblmasta / gpu-performance.sh
Last active Jul 18, 2017
Script for pre mining GPU performance. It's for 6 PCI cards GeForce GTX 1070 8GB. ETH mining at 30 MH/s per card
View gpu-performance.sh
#!/bin/bash
CLOCK=100
MEM=900
CMD='/usr/bin/nvidia-settings'
echo "performance" >/sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
echo "performance" >/sys/devices/system/cpu/cpu1/cpufreq/scaling_governor
echo 2800000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq
echo 2800000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq
@sblmasta
sblmasta / getRandomDoctrineItem.php
Created Nov 25, 2015 — forked from Thinkscape/getRandomDoctrineItem.php
Get random item from Doctrine2 repository
View getRandomDoctrineItem.php
<?php
use Doctrine\ORM\EntityManager;
/**
* Retrieve one random item of given class from ORM repository.
*
* @param EntityManager $em The Entity Manager instance to use
* @param string $class The class name to retrieve items from
* @return object
*/
View vagrant-my.cnf
[client]
port = 3306
socket = /var/run/mysqld/mysqld.sock
[isamchk]
key_buffer = 16M
[mysqld]
basedir = /usr
datadir = /var/lib/mysql
@sblmasta
sblmasta / validate-selectize-fields.js
Created Nov 2, 2015 — forked from yannleretaille/validate-selectize-fields.js
How to validate selectize.js comboboxes with the jQuery validation plugin
View validate-selectize-fields.js
//How to validate selectize.js comboboxes with the jQuery validation plugin
//selectize.js: http://brianreavis.github.io/selectize.js/ (brianreavis/selectize.js)
//http://jqueryvalidation.org (jzaefferer/jquery-validation)
//configure jquery validation
$("#commentForm").validate({
//the default ignore selector is ':hidden', the following selectors restore the default behaviour when using selectize.js
//:hidden:not([class~=selectized]) | selects all hidden elements, but not the original selects/inputs hidden by selectize
//:hidden > .selectized | to restore the behaviour of the default selector, the original selects/inputs are only validated if their parent is visible
//.selectize-control .selectize-input input | this rule is not really necessary, but ensures that the temporary inputs created by selectize on the fly are never validated
You can’t perform that action at this time.