This file contains 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
function base_converter(nbasefrom, basefrom, baseto) { | |
var SYMBOLS = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"; | |
if (basefrom<=0 || basefrom>SYMBOLS.length || baseto<=0 || baseto>SYMBOLS.length) { | |
console.log("Base unallowed"); | |
return null; | |
} | |
var i, nbaseten=0; | |
if (basefrom!=10) { | |
var sizenbasefrom = nbasefrom.length; | |
for (i=0; i<sizenbasefrom; i++) { |
This file contains 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
# Aliases | |
alias g='git' | |
compdef g=git | |
alias gst='git status' | |
compdef _git gst=git-status | |
alias gl='git pull' | |
compdef _git gl=git-pull | |
alias gup='git fetch && git rebase' | |
compdef _git gup=git-fetch | |
alias gp='git push' |
This file contains 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
#!/bin/bash | |
# generate new personal ed25519 ssh keys | |
ssh-keygen -o -a 100 -t ed25519 -f ~/.ssh/id_ed25519 -C "rob thijssen <[email protected]>" | |
ssh-keygen -o -a 100 -t ed25519 -f ~/.ssh/id_robtn -C "rob thijssen <[email protected]>" | |
# generate new host cert authority (host_ca) ed25519 ssh key | |
# used for signing host keys and creating host certs | |
ssh-keygen -t ed25519 -f manta_host_ca -C manta.network |
This file contains 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
class MyComponent extends React.Component { | |
render() { | |
const {location, todos, users} = this.props; | |
// | |
// ... do things with your variables! | |
// | |
return ( | |
<MyChild {...{location, todos, user}} /> | |
// equivalent to: | |
// <MyChild location={location} todos={todos} user={user} /> |