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
1. sudo rm -rf /usr/share/atom/resources/app/apm/node_modules/npm/lib/utils/metrics* | |
2. sudo vi `/usr/share/atom/resources/app/apm/node_modules/npm/lib/npm.js` | |
3. Remove the line that requires 'metrics' package |
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
import gevent | |
processes = {} | |
def process(id, data): | |
print(f'{id=} {data=}') | |
# reschedule the process function to run after a second. | |
# If reschedulre is called again before 1 second is up, the previous function is cancelled |
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
Get source: `apt install linux-source-*` | |
Extract source somewhere `tar xf /usr/src/linux-source-*` | |
cd to the module to build i.e `cd drivers/nvme/target/` | |
Build it using existing kernel | |
make -C /lib/modules/5.7.0-0.bpo.2-amd64/build M=(pwd) | |
Install to modules extra dir `sudo make -C /lib/modules/5.7.0-0.bpo.2-amd64/build M=(pwd) modules_install` | |
Generate dependencies `sudo depmod` | |
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
This is what worked for me on 4.22 on Linux (ubuntu 18.04) | |
Engine/Saved/UnrealBuildTool/BuildConfiguration.xml | |
<?xml version="1.0" encoding="utf-8" ?> | |
<Configuration xmlns="https://www.unrealengine.com/BuildConfiguration"> | |
<LocalExecutor> | |
<MaxProcessorCount>8</MaxProcessorCount> | |
</LocalExecutor> | |
</Configuration> |
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
from distutils.ccompiler import new_compiler | |
from sysconfig import get_paths | |
import os | |
project_name = "slimey_project" | |
source = ['source1.c'] | |
include_dirs = ['include'] | |
build_dir = os.path.join(os.path.dirname(__file__), 'build') | |
class StaticLib(Command): |
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 fs = require('fs'); | |
const path = require('path'); | |
const xml2js = require('xml2js'); | |
const data = fs.readFileSync(path.join(__dirname, process.argv[2]), {encoding: 'UTF-8'}); | |
xml2js.parseString(data, (err, result) => { | |
const str = result.map.string[6]._; | |
console.log(str); |
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 python3 | |
# Documentation for Wnck is at http://lazka.github.io/pgi-docs/#Wnck-3.0/classes/Workspace.html#Wnck.Workspace.get_number | |
# Documentation for keyboard is at https://github.com/boppreh/keyboard | |
import keyboard as kb | |
import gi | |
gi.require_version('Wnck', '3.0') | |
from gi.repository import Wnck, Gtk |
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 functions = require('firebase-functions'); | |
const admin = require('firebase-admin'); | |
const {credentials} = functions.config().auth; | |
credentials.private_key = credentials.private_key.replace(/\\n/g, '\n'); | |
const config = Object.assign({}, functions.config().firebase, {credentials}); | |
admin.initializeApp(config); | |
const gcs = require('@google-cloud/storage')({credentials}); | |
const dns = require('@google-cloud/dns')({credentials}); | |
const zoneName = 'applambda'; | |
const zone = dns.zone(zoneName); |
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
set clipboard=unnamed | |
set shell=bash | |
syntax on | |
set nocompatible " be iMproved, required | |
filetype off " required | |
filetype plugin indent on | |
" show existing tab with 4 spaces width | |
set tabstop=4 | |
" " when indenting with '>', use 4 spaces width |
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
Show hidden characters
{ | |
"env": { | |
"browser": true, | |
"es6": true, | |
"node": true | |
}, | |
"extends": "eslint:recommended", | |
"parserOptions": { | |
"sourceType": "module", | |
"ecmaFeatures": { |
NewerOlder