Skip to content

Instantly share code, notes, and snippets.

View udnaan's full-sized avatar
🌎
Thriving

Adnan Yunus udnaan

🌎
Thriving
View GitHub Profile
@udnaan
udnaan / config.fish ssh
Last active June 21, 2016 21:45
fish_config
if not set -q $SSH_TTY
test -e {$HOME}/.iterm2_shell_integration.fish ; and source {$HOME}/.iterm2_shell_integration.fish
end
@udnaan
udnaan / torch_activate.fish
Last active March 13, 2018 16:37
Fish shell torch-activate fucntion
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
@udnaan
udnaan / openssl_cross_compile.md
Last active June 24, 2024 00:54
How to cross compile Openssl 1.1.0 for Windows Host on Ubuntu 14.04 LTS

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:

@udnaan
udnaan / ftp.py
Last active August 29, 2015 14:23
Python script to ftp a file
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
@udnaan
udnaan / add_to_context_menu.bat
Created March 30, 2015 02:04
A batch file to add sublime text 3 poartable to context menu
@echo off
set st3=d:\downloads\software\sublimeText3\sublime_text.exe
rem Add to file/*
@reg add "HKEY_CLASSES_ROOT\*\shell\Edit with Sublime Text 3" /t REG_SZ /v "" /d "Edit" /f
@reg add "HKEY_CLASSES_ROOT\*\shell\Edit with Sublime Text 3" /t REG_EXPAND_SZ /v "Icon" /d "%st3%,0" /f
@reg add "HKEY_CLASSES_ROOT\*\shell\Edit with Sublime Text 3\command" /t REG_SZ /v "" /d "%st3% \"%%1\"" /f
rem Add to Dir/*
@reg add "HKEY_CLASSES_ROOT\Folder\shell\Open with Sublime Text 3" /t REG_SZ /v "" /d "Open In ST3" /f