Skip to content

Instantly share code, notes, and snippets.

View Linch1's full-sized avatar
💭
I may be slow to respond.

Linch1

💭
I may be slow to respond.
View GitHub Profile
@Mahedi-61
Mahedi-61 / cuda_11.8_installation_on_Ubuntu_22.04
Last active May 4, 2024 14:18
Instructions for CUDA v11.8 and cuDNN 8.9.7 installation on Ubuntu 22.04 for PyTorch 2.1.2
#!/bin/bash
### steps ####
# Verify the system has a cuda-capable gpu
# Download and install the nvidia cuda toolkit and cudnn
# Setup environmental variables
# Verify the installation
###
### to verify your gpu is cuda enable check
@veox
veox / erc20.abi.json
Created January 21, 2018 14:59
ERC20 ABI in JSON format
[
{
"constant": true,
"inputs": [],
"name": "name",
"outputs": [
{
"name": "",
"type": "string"
}
/**
* Ethereum Account Scanner
*
* To run this, you need your own geth node, accepting RPC
* connections on a port you can access.
*
* Install pre-requisites:
* sudo npm install -g web3
*
* Usage:
@bverbeken
bverbeken / SomeController.java
Last active May 13, 2020 16:00
convert spring field errors to json
@RequestMapping(method = POST)
@ResponseBody
public ResponseEntity<?> submit(@Valid MyRequestType request, BindingResult result) {
if (result.hasErrors()) {
return new ResponseEntity<>(getErrorsInASaneFormat(result), BAD_REQUEST);
}
// do stuff
return new ResponseEntity(CREATED);
}
@shivkumarganesh
shivkumarganesh / server.js
Created July 22, 2013 08:11
Creating a NodeJS cluster with ExpressJS.
/**
* Module dependencies.
*/
var express = require('express')
, routes = require('./routes')
, user = require('./routes/user')
, http = require('http')
, path = require('path')