cat /etc/resolv.conf
sudo python3 -m http.server 80
ip a
import { URL } from 'url'; // in Browser, the URL in native accessible on window | |
const __filename = new URL('', import.meta.url).pathname; | |
// Will contain trailing slash | |
const __dirname = new URL('.', import.meta.url).pathname; |
class SessionToken { | |
} | |
class IDP { | |
static token | |
} | |
SELECT client.id, client.name, count(user.clientId) as total_users | |
from client | |
left join user | |
on (client.id = user.clientId) | |
group by | |
client.id | |
having total_users > 2 |
import React, { useState, useEffect } from "react"; | |
type MousePositionType = { | |
x: number; | |
y: number; | |
}; | |
type WindowSizeType = { | |
height: number; | |
width: number; |
//reference http://hasin.me/2013/10/27/how-to-login-a-user-programatically-in-symfony2/ | |
//... | |
class UserController extends FOSRestController implements ClassResourceInterface { | |
//... | |
/** | |
* Authenticate a user with Symfony Security | |
* |
@Override | |
public void onCreate(Bundle savedInstanceState) { | |
super.onCreate(savedInstanceState); | |
setContentView(R.layout.activity_comments); | |
String htmlComments = getHtmlComment("yourId", "yourShortName"); | |
webDisqus = (WebView) findViewById(R.id.disqus); | |
// set up disqus | |
WebSettings webSettings2 = webDisqus.getSettings(); |
// location: ./assertions/compareScreenshot.js | |
var resemblejs = require('node-resemble-js'), | |
fs = require('fs'); | |
exports.assertion = function(filename, expected) { | |
var screenshotPath = 'test/screenshots/', | |
baselinePath = screenshotPath + 'baseline/' + filename, | |
resultPath = screenshotPath + 'results/' + filename, | |
diffPath = screenshotPath + 'diffs/' + filename; |
function calcLong(lat, long, distance) { | |
var earth = 6378.137, //radius of the earth in kilometer | |
pi = Math.PI, | |
cos = Math.cos, | |
m = (1 / ((2 * pi / 360) * earth)) / 1000; //1 meter in degree | |
return long + (distance * m) / cos(lat * (pi / 180)); | |
} | |
function calcLat(lat, long, distance) { |
How to work nicely and sound with Git (Gitlab/Github):
1 - Let's get our local updated before everything
git fetch --all
2 - Now we start a new branch (from master!)
git checkout origin/master
(or git checkout upstream/master or similar depending on your setup)
and
git checkout -b feature-a