-
Icon fonts
-
Cross Browser Compatibility
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
| // A small SSH daemon providing bash sessions | |
| // | |
| // Server: | |
| // cd my/new/dir/ | |
| // #generate server keypair | |
| // ssh-keygen -t rsa | |
| // go get -v . | |
| // go run sshd.go | |
| // | |
| // Client: |
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
| #!/bin/bash | |
| for file in $(git diff --cached --name-only | grep -E '\.(js|jsx)$') | |
| do | |
| git show ":$file" | node_modules/.bin/eslint --stdin --stdin-filename "$file" # we only want to lint the staged changes, not any un-staged changes | |
| if [ $? -ne 0 ]; then | |
| echo "ESLint failed on staged file '$file'. Please check your code and try again. You can run ESLint manually via npm run eslint." | |
| exit 1 # exit with failure status | |
| fi | |
| done |
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
| #! /bin/bash | |
| ifconfig -a | grep -o 'inet6\? \(addr:\)\?\s\?\(\(\([0-9]\+\.\)\{3\}[0-9]\+\)\|[a-fA-F0-9:]\+\)' | awk '{ sub(/inet6? (addr:)? ?/, ""); print }' |
- Javascript fundamentals 7- hours
- Udacity Javascript Basics
- NodeSchool.io - Javascripting
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
| function getUrlParam (name) { | |
| var reg = new RegExp('(^|&)' + name + '=([^&]*)(&|$)'), | |
| r = window.location.search.substr(1).match(reg); | |
| return r != null ? unescape(r[2]) : null; | |
| } |
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
| #! /bin/bash | |
| ps -ef|grep -v grep |grep -e process_name |awk '{print $2}'|xargs sudo kill |
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
| # config/application.rb | |
| config.cache_store = [ :file_store, "/tmp/rails-cache/" ] | |
| config.assets.cache_store = [ :file_store, "/tmp/rails-cache/assets/#{Rails.env}/" ] |
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
| rackup -b "run Rack::Directory.new '.'" |
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
| require 'sinatra' | |
| get '/' do | |
| File.read(File.join('public', 'index.html')) | |
| # or | |
| # send_file File.join(settings.public, 'index.html') | |
| end |
NewerOlder