// jQuery
$(document).ready(function() {
// code
})
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
const redux = require("redux"); | |
const createStore = redux.createStore; | |
const initialState = { | |
counter: 0, | |
}; | |
//reducer | |
const reducer = (state = initialState, action) => { |
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
javascript:if(!window.__debug_div_borders_inited) { var sheet = document.styleSheets[0]; sheet.insertRule('body.__debug_div_borders div { outline: 1px solid green; }', ((sheet.cssRules && sheet.cssRules.length) || 0)); window.__debug_div_borders_inited = true; } document.body.classList.toggle('__debug_div_borders');void(0); |
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
install: | |
sudo apt install xdotool x11-xserver-utils or sudo apt-get install xdotool | |
usage: add to this keybord shortcut | |
To set focus to left screen pass "left" as arg | |
python3 ./focus_changer.py left |
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
After install rofi we can type terminal following command to run rofi | |
rofi show <mode> mode = run or window | |
we can also add keybord shortcuts to run rofi in lubuntu | |
go to .config/openbox there you will find lubuntu-rc.xml file this file contain all shortcuts our system | |
we need to add addition shortcuts | |
<keybind key="W-space"> | |
<action name="Execute"> |
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
// 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 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
// Joins path segments. Preserves initial "/" and resolves ".." and "." | |
// Does not support using ".." to go above/outside the root. | |
// This means that join("foo", "../../bar") will not resolve to "../bar" | |
function join(/* path segments */) { | |
// Split the inputs into a list of path commands. | |
var parts = []; | |
for (var i = 0, l = arguments.length; i < l; i++) { | |
parts = parts.concat(arguments[i].split("/")); | |
} | |
// Interpret the path commands to get the new resolved path. |
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
sudo apt-get update | |
sudo apt-get install postgresql postgresql-contrib | |
Switching Over to the postgres Account | |
The installation procedure created a user account called postgres that is associated with the default Postgres role. | |
In order to use Postgres, we can log into that account. | |
Switch over to the postgres account on your server by typing: | |
sudo -i -u postgres | |
You can now access a Postgres prompt immediately by typing: |
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
git rm -r --cached node_modules | |
git commit -m ':) ;)' | |
git push origin master |
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
Show hidden characters
{ | |
"presets": [ | |
["es2015", { | |
"es2015": { | |
"loose": true, | |
"modules": false | |
} | |
}], "react" | |
] | |
} |
NewerOlder