Skip to content

Instantly share code, notes, and snippets.

View straxico's full-sized avatar
🍵
live with tea

mehran motiee straxico

🍵
live with tea
View GitHub Profile
find commit id
wget https://update.code.visualstudio.com/commit:{commit id}/server-linux-x64/stable
cd ~/
wget http://proxy.com/vscode/stable
cd ~/.vscode-server/bin/{commit id}
tar -xvzf ~/stable --strip-components 1
const request = require('request')
const cheerio = require('cheerio')
function alexaStats (domain) {
return new Promise((resolve, reject) => {
request({
url: `http://www.alexa.com/siteinfo/${domain}`,
headers: {
Host: 'www.alexa.com',
Referer: `http://www.alexa.com/siteinfo/${domain}`,
{
"git.autofetch": true,
"sync.autoDownload": true,
"sync.autoUpload": true,
"sync.gist": "0675ee2f6e62a82209371e62e4f107c4",
"showGitMetrics": false
}
@straxico
straxico / .eslintrc.json
Created September 1, 2019 22:36
eslint config file for react prettier typescript
{
"env": {
"browser": true,
"es6": true,
"node": true
},
"extends": ["airbnb", "prettier/@typescript-eslint", "plugin:prettier/recommended"],
"globals": {
"Atomics": "readonly",
"SharedArrayBuffer": "readonly"
import Document from 'next/document'
import { ServerStyleSheet } from 'styled-components'
export default class MyDocument extends Document {
static async getInitialProps (ctx) {
const sheet = new ServerStyleSheet()
const originalRenderPage = ctx.renderPage
try {
ctx.renderPage = () =>
# -*- coding: utf-8 -*-
"""
Created on Wed Jun 26 11:42:12 2019
@author: mehran
"""
# -*- coding: utf-8 -*-
$ docker login -u $CI_DEPLOY_USER -p $CI_DEPLOY_PASSWORD $CI_REGISTRY
Error: Cannot perform an interactive login from a non TTY device
ERROR: Job failed: exit code 1
.............................................................................................
$ docker login -u gitlab-ci-token -p ${CI_BUILD_TOKEN} ${CI_REGISTRY}
docker build -t next-app .
docker run --rm -it -p 3000:3000/tcp next-app:latest
docker run --rm -it -p 3000:3000 -e "API_URL=https://example.com" next-app
docker system prune --volumes -f
...........................................................
const isServer = typeof window === 'undefined'
# -*- coding: utf-8 -*-
"""
Created on Wed Sep 12 18:17:16 2018
@author: strix
"""
import instaloader
L = instaloader.Instaloader()
L.login('#########username#######', '#######password##########') # (login)
profile = instaloader.Profile.from_username(L.context, '#########username of target##############')
list=[]