Description | Command |
---|---|
Start a new session with session name | screen -S <session_name> |
List running sessions / screens | screen -ls |
Attach to a running session | screen -x |
Attach to a running session with name | screen -r <session_name> |
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 autorefreshRudderstack() { | |
document.querySelector('button[name="Pause"]').setAttribute('id', 'button--refresh') | |
setInterval(() => { | |
document.querySelector('#button--refresh').click() | |
document.querySelector('#button--refresh').click() | |
}, 5000) | |
})(); |
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
// So I had trouble with Coderbyte's "Moving Median". I have no idea what a "moving median" or a "sliding window" is. | |
// I can't understand the problem and googling it unfortunately didn't help me at that moment. Maybe I panicked? | |
// So I burned the remaining 1h50m of a 2 hour test and as I opened a new tab and searched 'moving median "javascript"' | |
// and I stumbled upon this: https://www.tutorialspoint.com/finding-median-for-every-window-in-javascript | |
// | |
// Median turns out was simply the number in the middle of the specified "sliding window". | |
// I guess I should've listened to my Math professor back in highschool jeez | |
// | |
// Below is my take on this problem |
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
{ | |
"debug": true, | |
"delay": 0.5, | |
"linters": { | |
// basically, this is just what you need in enabling a linter | |
"php": { | |
"disable": false | |
}, | |
"phpcs": { | |
"args": [ |
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
set -g prefix C-space | |
# Use Alt-arrow keys without prefix key to switch panes | |
bind -n M-Left select-pane -L | |
bind -n M-Right select-pane -R | |
bind -n M-Up select-pane -U | |
bind -n M-Down select-pane -D | |
set -g @plugin 'tmux-plugins/tmux-resurrect' | |
set -g @plugin 'tmux-plugins/tpm' |
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
<?php | |
/** | |
* Compiles all files into one giant package file | |
* | |
* Usage php compiler.php path/directory/PackageFoo | |
* | |
* We assume that your package is under a package folder. This will be used as the package file name | |
* e.g. path/directory/PackageFoo/ | |
* |
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
@echo off | |
:: Mount directory to specified drive letter with fallback to achieve ubiquity across networks | |
:: Checks existence of host by the following order | |
:: - Check host in LAN | |
:: - Check host in Remote | |
:: - Check host in Local | |
:: Since Windows does not have native support for sftp/ssh we use sshfs (FUSE) instead |
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 gamifyApi() { | |
window.location.href = "https://www.amazon.com/hz/gamification/api/contributor/dashboard/" | |
+ window.CustomerProfileRootProps.directedId | |
+ "?ownerView=false" | |
+ "&customerFollowEnabled=false" | |
+ "&token=" + window.CustomerProfileRootProps.contributorDashboardData.token | |
} |
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 | |
# Convenience script for installing docker in Ubuntu | |
# | |
# https://docs.docker.com/install/linux/docker-ce/ubuntu/#install-using-the-repository | |
# https://docs.docker.com/install/linux/linux-postinstall/ | |
apt-get update | |
apt-get install apt-transport-https ca-certificates curl gnupg-agent software-properties-common | |
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add - |
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
<?php | |
function isEven($num) { | |
return ($num % 2 == 0); | |
} |
NewerOlder