This file contains hidden or 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
var | |
// Local ip address that we're trying to calculate | |
address | |
// Provides a few basic operating-system related utility functions (built-in) | |
,os = require('os') | |
// Network interfaces | |
,ifaces = os.networkInterfaces(); | |
// Iterate over interfaces ... |
This file contains hidden or 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
{ | |
"name": "zimble", | |
"version": "0.0.1", | |
"private": true, | |
"scripts": { | |
"android": "react-native run-android", | |
"ios": "react-native run-ios", | |
"start": "react-native start", | |
"test": "jest", | |
"lint": "eslint ." |
This file contains hidden or 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
import React from "react"; | |
import ReactDOM from "react-dom"; | |
import ApolloClient from "apollo-client"; | |
import { ApolloProvider } from "@apollo/react-hooks"; | |
import { ApolloLink, fromPromise } from "apollo-link"; | |
import { onError } from "apollo-link-error"; | |
// import "./index.css"; | |
import App from "./App"; | |
import * as serviceWorker from "./serviceWorker"; | |
import { createUploadLink } from "apollo-upload-client"; |
This file contains hidden or 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
import React from "react"; | |
import ReactDOM from "react-dom"; | |
import ApolloClient from "apollo-client"; | |
import { ApolloProvider } from "@apollo/react-hooks"; | |
import { ApolloLink, fromPromise, Observable } from "apollo-link"; | |
import { onError } from "apollo-link-error"; | |
// import "./index.css"; | |
import App from "./App"; | |
import * as serviceWorker from "./serviceWorker"; | |
import { createUploadLink } from "apollo-upload-client"; |
This file contains hidden or 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
Hereby I declare that the Instagram app bozho_bot won't invalidate anyone's privacy on the Instagram platform. | |
It is only used to automate some repetitive tasks for managing my account. |
This file contains hidden or 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
# Start MongoDB | |
`sudo systemctl start mongod` | |
# Check if MongoDB is running | |
`sudo systemctl status mongod` | |
# More info | |
https://www.digitalocean.com/community/tutorials/how-to-install-mongodb-on-ubuntu-16-04 | |
# Mount QNap NAS Folder to Ubuntu | |
Example: | |
sudo mount -t nfs sai.local:/Public /mnt/nas/Public |
This file contains hidden or 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
#!/usr/bash | |
wget https://dl.pstmn.io/download/latest/linux64 -O postman.tar.gz | |
sudo tar -xzf postman.tar.gz -C /opt | |
sudo ln -s /opt/Postman/Postman /usr/bin/postman | |
#Create a Desktop Entry | |
cat > ~/.local/share/applications/postman.desktop <<EOL | |
[Desktop Entry] | |
Encoding=UTF-8 | |
Name=Postman |
This file contains hidden or 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
# ViewSets define the view behavior. | |
class FooViewSet(viewsets.ModelViewSet): | |
lookup_field = 'slug' | |
queryset = Foo.objects.all() | |
serializer_class = FooSerializer | |
def get_queryset(self): | |
""" | |
This view should return a list of all records | |
""" |
This file contains hidden or 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/sh | |
set -e | |
# | |
# create a test user at developer.facebook.com and set these | |
# | |
FULL_NAME="Bob+Amchicieafci+Martinazziman" | |
APP_ID="123456123456123" | |
APP_SECRET="123abc123abc123abc123abc123abc12" |
This file contains hidden or 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
JS tools | |
1. nvm is updated by installing the latest version (it overwrites the previous). With nvm you can switch from more than one version of node. | |
2. Node is managed with nvm. | |
3. Npm is managed with node. To update run `npm install npm@latest -g`. |
NewerOlder