Install mingw tools on linux:
sudo apt-get install mingw-w64
clone openssl repo:
git clone https://github.com/openssl/openssl.git
Configure openssl for cross compile:
| import ftplib | |
| import plac | |
| def main(server, user, password, filepath, port=21): | |
| ftp = ftplib.FTP() | |
| ftp.connect(server, int(port)) | |
| ftp.login(user, password) | |
| print(ftp.getwelcome()) | |
| file = open(filepath, 'rb') # file to send |
Install mingw tools on linux:
sudo apt-get install mingw-w64
clone openssl repo:
git clone https://github.com/openssl/openssl.git
Configure openssl for cross compile:
| function torch_activate | |
| set -gx LUA_PATH '/Users/nan/.luarocks/share/lua/5.1/?.lua;/Users/nan/.luarocks/share/lua/5.1/?/init.lua;/usr/local/share/lua/5.1/?.lua;/usr/local/share/lua/5.1/?/init.lua;/Users/nan/p/torch/install/share/lua/5.1/?.lua;/Users/nan/p/torch/install/share/lua/5.1/?/init.lua;./?.lua;/Users/nan/p/torch/install/share/luajit-2.1.0-beta1/?.lua' | |
| set -gx LUA_CPATH '/Users/nan/.luarocks/lib/lua/5.1/?.so;/usr/local/lib/lua/5.1/?.so;./?.so;/Users/nan/p/torch/install/lib/lua/5.1/?.so;/usr/local/lib/lua/5.1/loadall.so' | |
| set -gx PATH /Users/nan/p/torch/install/bin $PATH | |
| set -gx LD_LIBRARY_PATH /Users/nan/p/torch/install/lib $LD_LIBRARY_PATH | |
| set -gx DYLD_LIBRARY_PATH /Users/nan/p/torch/install/lib $DYLD_LIBRARY_PATH | |
| set -gx LUA_CPATH '/Users/nan/p/torch/install/lib/?.dylib;'$LUA_CPATH | |
| end |
| if not set -q $SSH_TTY | |
| test -e {$HOME}/.iterm2_shell_integration.fish ; and source {$HOME}/.iterm2_shell_integration.fish | |
| end |
| { | |
| "env": { | |
| "browser": true, | |
| "es6": true, | |
| "node": true | |
| }, | |
| "extends": "eslint:recommended", | |
| "parserOptions": { | |
| "sourceType": "module", | |
| "ecmaFeatures": { |
| 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 |
| 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); |
| #!/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 |
| 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); |