A script to change settings of the Wired Gaming Mouse T1 when running Linux.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
################ NVIDIA DRIVER 440 INSTALLATION | |
# Install NVIDIA driver | |
wget http://us.download.nvidia.com/XFree86/Linux-x86_64/440.64/NVIDIA-Linux-x86_64-440.64.run | |
chmod a+x NVIDIA-Linux-x86_64-440.64.run | |
sudo dpkg --add-architecture i386 | |
sudo apt install lib32gcc1 build-essential dkms | |
sudo ./NVIDIA-Linux-x86_64-440.64.run --no-cc-version-check | |
# Reboot. Check that GPUs are visible using the command: nvidia-smi | |
################ NVIDIA CUDA 10.0 INSTALLATION |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const CommonsChunkPlugin = require('webpack/lib/optimize/CommonsChunkPlugin'); | |
const HtmlWebpackPlugin = require('html-webpack-plugin'); | |
const apps = [ | |
{ | |
name: 'app1', | |
baseUrl: '/app1' | |
}, | |
{ | |
name: 'app2', |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# coding: utf-8 | |
from __future__ import division | |
import struct | |
import sys | |
FILE_NAME = "GoogleNews-vectors-negative300.bin" | |
MAX_VECTORS = 200000 # This script takes a lot of RAM (>2GB for 200K vectors), if you want to use the full 3M embeddings then you probably need to insert the vectors into some kind of database | |
FLOAT_SIZE = 4 # 32bit float |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
from twisted.web import server, resource | |
from twisted.internet import reactor, defer | |
from pprint import pprint | |
import base64 | |
class DummyServer(resource.Resource): | |
isLeaf = True |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict'; | |
/** | |
* Bootstrap-toggle Directive | |
* @link https://github.com/minhur/bootstrap-toggle | |
*/ | |
angular.module('toggleCheckbox', []) | |
.directive('toggleCheckbox', function() { | |
/** |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Autobahn client with auto-reconnect capability | |
# Totally based on https://github.com/tavendo/AutobahnPython/blob/master/examples/twisted/wamp/beginner/client.py | |
import sys | |
from twisted.python import log | |
from twisted.internet import reactor | |
from twisted.internet.defer import inlineCallbacks | |
from twisted.internet.protocol import ReconnectingClientFactory | |
from autobahn.twisted import wamp, websocket | |
from autobahn.wamp import types |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Originally from http://sharebear.co.uk/blog/2009/09/17/very-simple-python-caching-proxy/ | |
# | |
# Usage: | |
# A call to http://localhost:80000/example.com/foo.html will cache the file | |
# at http://example.com/foo.html on disc and not redownload it again. | |
# To clear the cache simply do a `rm *.cached`. To stop the server simply | |
# send SIGINT (Ctrl-C). It does not handle any headers or post data. | |
import BaseHTTPServer | |
import hashlib |
Locate the section for your github remote in the .git/config
file. It looks like this:
[remote "origin"]
fetch = +refs/heads/*:refs/remotes/origin/*
url = [email protected]:joyent/node.git
Now add the line fetch = +refs/pull/*/head:refs/remotes/origin/pr/*
to this section. Obviously, change the github url to match your project's URL. It ends up looking like this:
To add a SFTP-only user, you'll need to make sure your SSH config settings are correct, add a new user/group and set permissions for your new user. For step-by-step directions, see below. Omit sudo
if you're logged in as root.
-
Edit
/etc/ssh/sshd_config
and make sure to add the following at the end of the file:Match group filetransfer
ChrootDirectory %h
NewerOlder