Skip to content

Instantly share code, notes, and snippets.

View nextlevelshit's full-sized avatar
💩
What?

Michael Werner Czechowski nextlevelshit

💩
What?
View GitHub Profile
@morrisonbrett
morrisonbrett / package.json
Last active July 15, 2018 21:25
Example of npm script commands used in an Ionic project.
"scripts": {
"clean": "ionic-app-scripts clean",
"build": "npm run ionic:build",
"start": "concurrently \"npm run build:watch\" \"npm run serve\"",
"serve": "lite-server -c=bs-config.json",
"ionic:build": "gulp default && npm run lint && ionic-app-scripts build",
"ionic:serve": "gulp default && npm run lint && ionic-app-scripts serve --sourceMap source-map --iscordovaserve --wwwDir platforms/browser/www/ --buildDir platforms/browser/www/build",
"build-prod-browser": "gulp browser && ionic-app-scripts build browser --wwwDir platforms/browser/www --sourceMap source-map",
"build-dev-browser": "gulp browser && ionic-app-scripts build browser --wwwDir platforms/browser/www --sourceMap source-map --dev",
"build-dev-android": "gulp default && cordova build android --debug",
# Android SDK setup
## Install Java
```bash
sudo apt-get update
sudo dpkg --add-architecture i386
sudo apt-get install libbz2-1.0:i386
sudo apt-get install libc6:i386 libncurses5:i386 libstdc++6:i386 lib32z1
sudo apt-get install openjdk-8-jdk openjdk-8-jre
@nextlevelshit
nextlevelshit / install-laravel-on-ubuntu.md
Last active September 27, 2020 05:47
A installation guide to get Lumen 5.5 running on Ubuntu 17.04 including all dependencies and known issues

How to install Laravel Lumen 5.5 on Ubuntu 17.04

In that installation guide i will carry you through all dependencies of Lumen 5.5 on a system with Ubuntu 17.04. I will also provide known issues, that come along the installation of Lumen.

1. Requirements for installing Lumen 5.5

Type in the commands beneath the required package and check if you have yet installed them. If not, click the link for installation guide.

PHP >= 7.0

@nextlevelshit
nextlevelshit / README.md
Last active November 4, 2020 08:49
Cronjob for Gatsby Deployment and Backup at Uberspace (https://uber.space)

1. Add both bash scripts to root folder of your repository to be deployed

Your root directory might look now like:

.
├── data
├── delete-old-backups.sh         # <------ Delete backups older than 15 days
├── deploy-and-backup-gatsby.sh   # <------ Deploy and backup "old" public directory
├── gatsby-browser.js
@vipickering
vipickering / closestNumberArray.js
Created September 13, 2013 15:42
Javascript: Find The Closest Number In Array To A Specific Value
var array = [];
function closest(array,num){
var i=0;
var minDiff=1000;
var ans;
for(i in array){
var m=Math.abs(num-array[i]);
if(m<minDiff){
minDiff=m;
@yamalight
yamalight / Makefile
Last active June 18, 2021 17:35
Generate docker TLS certs for secure remote access
# host name of your docker server
HOST=host.net
# ip of your docker server
IP=0.0.0.0
# days of validity for cert
DAYS=365
default:
openssl genrsa -aes256 -out ca-key.pem 4096
openssl req -new -x509 -days ${DAYS} -key ca-key.pem -sha256 -out ca.pem
@0x-r4bbit
0x-r4bbit / proposal.md
Last active May 2, 2022 03:50
Proposals on how to structure 'standalone' modules in angular. Please read it and leave your opinions for a better angularjs world!

Angular module structure (proposal)

Everyone who's reading this, please leave your opinion/ideas/proposals as a comment for a better world!

Background

Most of you guys read Josh' proposals to make components more reusable, I think. Now, reading through this proposals definitely gives a feeling that this is the right way. Anyways, If you haven't read it yet, you should.

So Josh shows us, how angular apps can be structured in a better and more reusable way. Reusability is a very important thing when it comes to software development. Actually the whole angularjs library follows a philosophy of reusability. Which is why you able to make things like:

@19h
19h / reset.js
Created February 19, 2013 22:51
Node.js — Clear Terminal / Console. Reset to initial state.
console.reset = function () {
return process.stdout.write('\033c');
}
@vitorebatista
vitorebatista / login.feature
Created May 10, 2019 23:51
BDD - Login example with Cucumber
Feature: Login
I want to login on Keepfy
Background:
Given I go to '/login'
And the field 'email' is empty
And the field 'password' is empty
Scenario: Error on empty fields
var p1={
x:0,
y:0
};
var p2={
x:0,
y:1
};