Skip to content

Instantly share code, notes, and snippets.

View AntoniosHadji's full-sized avatar

Antonios Hadjigeorgalis AntoniosHadji

View GitHub Profile
@AntoniosHadji
AntoniosHadji / update.R
Created November 1, 2018 19:33
update R to 3.5 and reinstall packages for jupyter notebook kernel on Ubuntu 18.04
install.packages('base64enc')
install.packages('rprojroot')
install.packages('backports')
install.packages('rprojroot')
install.packages('rlang')
install.packages('digest')
install.packages('Rcpp')
install.packages('jsonlite')
install.packages('glue')
install.packages('devtools')
Verifying my Blockstack ID is secured with the address 1CAQpfwPf5wtQ514LN4NsgvH1TXsd1gZkb https://explorer.blockstack.org/address/1CAQpfwPf5wtQ514LN4NsgvH1TXsd1gZkb
@AntoniosHadji
AntoniosHadji / parity.service
Created September 25, 2017 23:48
systemd unit file for parity with clean exits
[Unit]
Description=Parity Daemon
After=network.target
[Service]
# https://www.freedesktop.org/software/systemd/man/systemd.service.html#Command%20lines
ExecStart=/usr/bin/parity --config /etc/parity/config.toml
# Specifies how processes of this unit shall be killed.
# One of control-group, process, mixed, none.
@AntoniosHadji
AntoniosHadji / ethminer.txt
Created September 24, 2017 23:55
ethminer output
ethminer -G -M -v 9
ℹ 19:46:47|ethminer Found suitable OpenCL device [ Ellesmere ] with 6200512512 bytes of GPU memory
Benchmarking on platform: CL
Preparing DAG for block #0
cl 19:46:47|cl-0 No work. Pause for 3 s.
Warming up...
cl 19:46:50|cl-0 New work: header #50c856ae… target 0000000000000002000000000000000000000000000000000000000000000000
cl 19:46:50|cl-0 New seed #00000000…
cl 19:46:51|cl-0 Platform: AMD Accelerated Parallel Processing
cl 19:46:51|cl-0 Device: Ellesmere / OpenCL 1.2 AMD-APP (2442.7)
@AntoniosHadji
AntoniosHadji / clinfo.txt
Created September 24, 2017 23:52
clinfo
clinfo
Number of platforms: 1
Platform Profile: FULL_PROFILE
Platform Version: OpenCL 2.0 AMD-APP (2442.7)
Platform Name: AMD Accelerated Parallel Processing
Platform Vendor: Advanced Micro Devices, Inc.
Platform Extensions: cl_khr_icd cl_amd_event_callback cl_amd_offline_devices
Platform Name: AMD Accelerated Parallel Processing
@AntoniosHadji
AntoniosHadji / pgessays.py
Created September 10, 2016 23:27 — forked from olasitarska/pgessays.py
Builds epub book out of Paul Graham's essays.
# -*- coding: utf-8 -*-
"""
Builds epub book out of Paul Graham's essays: http://paulgraham.com/articles.html
Author: Ola Sitarska <ola@sitarska.com>
Copyright: Licensed under the GPL-3 (http://www.gnu.org/licenses/gpl-3.0.html)
This script requires python-epub-library: http://code.google.com/p/python-epub-builder/
"""
@AntoniosHadji
AntoniosHadji / ToggleScreenLock.sh
Created December 3, 2014 18:14
This shell script will toggle the screen lock setting in Ubuntu. System Settings > Brightness & Lock > Turn screen off when inactive for:
#!/usr/bin/env bash
# -*- coding: utf-8 -*-
Z=$(gsettings get org.gnome.desktop.session idle-delay)
echo $Z
# 600 for 10 minutes, change to suit your needs
if [ "$Z" = "uint32 600" ]; then
gsettings set org.gnome.desktop.session idle-delay 0
echo set zero
else
@AntoniosHadji
AntoniosHadji / TTUSAPI1.cs
Created February 24, 2014 21:17
TTUSAPI Gateway Available and AutoLogin setings
if (ASG.TTUS.m_Users.ContainsKey(dr[0].ToString()))
{
TTUSAPI.DataObjects.User u = ASG.TTUS.m_Users[dr[0].ToString()];
TTUSAPI.DataObjects.UserProfile up = new TTUSAPI.DataObjects.UserProfile(u);
Trace.WriteLine(u.UserName);
foreach (string key in up.UserGatewayLogins.Keys)
{
Trace.WriteLine(key);
TTUSAPI.DataObjects.UserGatewayLoginProfile UserGWP = new TTUSAPI.DataObjects.UserGatewayLoginProfile(up.UserGatewayLogins[key]);
@AntoniosHadji
AntoniosHadji / gist:f116abb1cfd65b30b9fb
Created November 22, 2013 18:07
These are two commands that can be run on windows to automatically uninstall all X_TRADER components or all TT software.
# Uninstall all software from Trading Technologies
wmic product where "Vendor like 'Trading Tech%%'" call uninstall /nointeractive
# Uninstall all X_TRADER components
wmic product where "name like 'TT%%'" call uninstall /nointeractive
Public Function SetRTDUpdateRate(mSeconds As Long) As String
'Set RTDUpdate Rate registry value
Application.RTD.ThrottleInterval = mSeconds
SetRTDUpdateRate = mSeconds & " mS"
End Function