tmux attach -t base || tmux new -s base
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
| var output = ''; | |
| for (var property in response) { | |
| output += property + ': ' + response[property]+'; '; | |
| } | |
| console.log('Response: ', output); |
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
| // Speed up calls to hasOwnProperty | |
| var hasOwnProperty = Object.prototype.hasOwnProperty; | |
| function isEmpty(obj) { | |
| // null and undefined are "empty" | |
| if (obj == null) return true; | |
| // Assume if it has a length property with a non-zero value | |
| // that that property is correct. |
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 randomString(length, chars) { | |
| var result = ''; | |
| for (var i = length; i > 0; --i) result += chars[Math.floor(Math.random() * chars.length)]; | |
| return result; | |
| } | |
| var rString = randomString(32, '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'); |
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
| <application android:allowBackup="false" android:fullBackupContent="false" |
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
| //LocalStorage not being cleared on app uninstall - Android 6 | |
| //AndroidManifest.xml | |
| <application android:allowBackup="false" android:fullBackupContent="false" ... |
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
| // sending to sender-client only | |
| socket.emit('message', "this is a test"); | |
| // sending to all clients, include sender | |
| io.emit('message', "this is a test"); | |
| // sending to all clients except sender | |
| socket.broadcast.emit('message', "this is a test"); | |
| // sending to all clients in 'game' room(channel) except sender |
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
| if(navigator.platform.match('Mac') !== null) { | |
| document.body.setAttribute('class', 'OSX'); | |
| } |
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
| # Даем права на запуск: | |
| # chmod +x translit.sh | |
| # Открываем и копируем листинг скрипта: |
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
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <style> | |
| body { | |
| counter-reset: section; | |
| } | |
| h2::before { | |
| counter-increment: section; |