Skip to content

Instantly share code, notes, and snippets.

View wspl's full-sized avatar
⛱️
every cloud has a silver lining

PLUTO wspl

⛱️
every cloud has a silver lining
View GitHub Profile
@johnstcn
johnstcn / ethminer_ubuntu_nvidia.md
Last active October 1, 2022 16:34
NVIDIA/CUDA ethminer setup under Ubuntu Server 16.04

Headless Ethminer (nVidia) Setup Guide

Cian Johnston, July 2017

WARNING: THESE WORDS ARE OLD AND MAY NOT WORK FOR YOU IN THESE NEW AND INTERESTING TIMES.

A couple of weeks ago, I decided I should put my gaming rig to work crypto mining. I did not expect to make any significant profit on this, it was more of a fun project to set up. However, there were a large number of tutorials and guides already out there, and many were more than a year out of date.

This guide assumes the reader already has a crypto wallet set up, is comfortable with Linux and the command line, and knows how to use Google if they run into problems.

The end result is an Ubuntu 16.04 LTS headless server running CUDA ethminer via systemd.

@hrektts
hrektts / udp_echo_server_tokio.rs
Last active November 1, 2016 09:47
UDP echo server with futures and tokio.
extern crate futures;
#[macro_use]
extern crate tokio_core;
use std::env;
use std::io::{Error, ErrorKind};
use std::net::SocketAddr;
use futures::{Async, Future, Poll};
use tokio_core::net::UdpSocket;
@terrydang
terrydang / install_nvidia_driver_in_ubuntu1604.md
Last active August 8, 2022 09:31
Ubuntu 16.04 安装英伟达(Nvidia)显卡驱动

Ubuntu 16.04 安装英伟达(Nvidia)显卡驱动

配有英伟达显卡的主机,装完 Ubuntu 16.04 后出现闪屏现象,是由于没有安装显卡驱动。

显卡型号
NVIDIA Corporation GM204 [GeForce GTX 970]

anonymous
anonymous / curl_163_music_comments.php
Created February 17, 2016 04:28
获取网易云音乐歌曲评论
<?php
// 获取网易云音乐歌曲评论
function curl_get($url){
$host = parse_url($url);
$site = $host['scheme']."://".$host['host'];
$ch = curl_init($url);
curl_setopt($ch, CURLOPT_TIMEOUT, 30);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE);
curl_setopt($ch, CURLOPT_REFERER, $site);
@fljot
fljot / Mac OS X 10_5_ Windows Ctrl.xml
Last active January 9, 2023 07:12
AutoHotkey mappings to emulate OSX keyboard shortcuts on Windows
<!-- put this to IDEA keymaps config folder. For v13 it is <userdir>\.IntelliJIdea13\config\keymaps\ -->
<?xml version="1.0" encoding="UTF-8"?>
<keymap version="1" name="Mac OS X 10.5+ Windows Ctrl" parent="Mac OS X 10.5+">
<action id="$Copy">
<keyboard-shortcut first-keystroke="meta C" />
<keyboard-shortcut first-keystroke="meta INSERT" />
<keyboard-shortcut first-keystroke="control C" />
<keyboard-shortcut first-keystroke="control INSERT" />
</action>
<action id="$Cut">
import Foundation
extension String
{
var length: Int {
get {
return countElements(self)
}
}
@yangacer
yangacer / fsevent.cpp
Created July 19, 2013 06:28
Minimum example of FSEvent (no thread creation)
#include <CoreServices/CoreServices.h>
#include <iostream>
void callback(
ConstFSEventStreamRef stream,
void *callbackInfo,
size_t numEvents,
void *evPaths,
const FSEventStreamEventFlags evFlags[],
const FSEventStreamEventId evIds[])