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 childProcess = require('child_process'); | |
function execProcess(command) { | |
childProcess.exec(command, function(error, stdout, stderr) { | |
console.log(`stdout: ${stdout}`); | |
console.log(`stderr: ${stderr}`); |
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
//==============================================================// | |
//********* List of affiliate programs admitad.com API *********// | |
// https://developers.admitad.com/ | |
//==============================================================// | |
var https = require('https'); | |
var host = 'api.admitad.com'; | |
var port = 443; | |
var config = require('./config'); // your config here | |
var clientId = config.yourClientId; // client id |
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
# undo git pull | |
git reset --hard ORIG_HEAD | |
# remove specific file from git cache | |
git rm --cached filename | |
# remove all files from git cache | |
git rm -r --cached . | |
git add . | |
git commit -m ".gitignore is now working" |
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
# Node.js upgrade or install version 7.x, 8.x, 9.x etc | |
sudo apt-get update | |
sudo apt-get install curl | |
curl -sL https://deb.nodesource.com/setup_9.x | sudo -E bash - | |
sudo apt-get install nodejs | |
# NPM downgrade or install custom version npm@x.y.z | |
npm i npm@5.3.0 -g | |
# Node.js and NPM completely remove | |
sudo apt-get remove nodejs | |
sudo apt-get remove npm |
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 http = require('http'); | |
const url = require('url'); | |
const port = 6006; | |
const requestHandler = (request, response) => { | |
const query = url.parse(request.url, true).query; | |
if (query && query.count && (query.count > 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
using System.Collections; | |
using System.Collections.Generic; | |
using UnityEngine; | |
using UnityEngine.UI; | |
public class ScrollViewAdapterConnected : MonoBehaviour { | |
public RectTransform prefarb; | |
public Text countText; | |
public RectTransform content; |
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
using System.Collections; | |
using UnityEngine; | |
using UnityEngine.UI; | |
public class ScrollViewAdapter : MonoBehaviour { | |
public RectTransform prefarb; | |
public Text countText; | |
public RectTransform content; |
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
<html> | |
<head> | |
<title>#BlondieCode загадка null>=0</title> | |
<meta charset="UTF-8"> | |
</head> | |
<body> | |
<h1>Вся соль в консоли ;)</h1> | |
<a href="https://www.youtube.com/channel/UCSsg9NLCse2XQCIRgfmJu3Q", target="_blank"> | |
<h3>Больше на канале #BlondieCode</h3> | |
</a> |
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
<html> | |
<head> | |
<title>Самая сложная логическая задача</title> | |
<meta charset="UTF-8"> | |
<style> | |
body, html { | |
margin: 0; | |
padding: 0; | |
} | |
body { |
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
bind_ip = 127.0.0.1 | |
iptables -A INPUT -s 127.0.0.1 -p tcp --dport 27017 -j ACCEPT | |
iptables -A INPUT -s xxx.xxx.xxx.xxx -p tcp --dport 27017 -j ACCEPT | |
iptables -A INPUT -s yyy.yyy.yyy.yyy -p tcp --dport 27017 -j ACCEPT | |
iptables -A INPUT -p tcp --dport 27017 -j DROP | |
iptables -L -n | |
sudo apt-get install iptables-persistent | |
service iptables-persistent save | |
service iptables-persistent start | |
iptables -F |