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
$Path = $env:TEMP; $Installer = "chrome_installer.exe"; Invoke-WebRequest "http://dl.google.com/chrome/install/375.126/chrome_installer.exe" -OutFile $Path\$Installer; Start-Process -FilePath $Path\$Installer -Args "/silent /install" -Verb RunAs -Wait; Remove-Item $Path\$Installer |
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
{ | |
"packages": [ | |
{ | |
"name": "esp32", | |
"maintainer": "Espressif Systems", | |
"websiteURL": "https://github.com/espressif/arduino-esp32", | |
"email": "[email protected]", | |
"help": { | |
"online": "http://esp32.com" | |
}, |
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
(new-object System.Net.WebClient).DownloadFile('https://dl.google.com/chrome/install/latest/chrome_installer.exe', 'chrome.exe');.\chrome.exe /silent /install;rm chrome.exe |
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 | |
iptables -A INPUT -p tcp --dport 80 -j ACCEPT | |
iptables -A INPUT -p tcp --dport 443 -j ACCEPT | |
sudo apt-get update | |
sudo apt-get install iptables-persistent |
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
server { | |
listen 80 default; | |
# server_name _; | |
root /app; | |
index index.php index.html index.htm; | |
location / { | |
# First attempt to serve request as file, then | |
# as directory, then trigger 404 |
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 buildRegExp(searchText) { | |
var words = searchText.trim().split(/[ \-\:]+/); | |
var exps = _.map(words, function(word) { | |
return "(?=.*" + word + ")"; | |
}); | |
var fullExp = exps.join('') + ".+"; | |
return new RegExp(fullExp, "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
ssh ubuntu@HOSTNAME 'sudo cp /home/ubuntu/.ssh/authorized_keys /root/.ssh/' |
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
Template.chatItem.onCreated(function() { | |
var instance = Template.instance(); | |
instance.member = new ReactiveVar(); | |
instance.autorun(function() { | |
var id = this.userId; | |
Meteor.call('getMember', id, function(err, data) { | |
instance.member.set(data); | |
}); | |
}); | |
}); |
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
mkdir ~/db && mysql -s -r -u root -p{Secret} -e 'show databases' | while read db; do mysqldump -u root -p{Secret} $db -r ~/db/${db}.sql; [[ $? -eq 0 ]] && gzip ~/db/${db}.sql; done |
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
/** | |
* Get the parent template instance | |
* @param {Number} [levels] How many levels to go up. Default is 1 | |
* @returns {Blaze.TemplateInstance} | |
*/ | |
Blaze.TemplateInstance.prototype.parentTemplate = function (levels) { | |
var view = Blaze.currentView; | |
if (typeof levels === "undefined") { | |
levels = 1; |
NewerOlder