It assumes you have curl
installed in your system.
Add this function in your .bashrc
or .zshrc
file.
weather() {curl wttr.in/${1:-Berlin}}
# SETUP # | |
DOMAIN=example.com | |
PROJECT_REPO="[email protected]:example.com/app.git" | |
AMOUNT_KEEP_RELEASES=5 | |
RELEASE_NAME=$(date +%s--%Y_%m_%d--%H_%M_%S) | |
RELEASES_DIRECTORY=~/$DOMAIN/releases | |
DEPLOYMENT_DIRECTORY=$RELEASES_DIRECTORY/$RELEASE_NAME | |
# stop script on error signal (-e) and undefined variables (-u) |
# load oh-my-zsh | |
antigen use oh-my-zsh | |
# use oh-my-zsh plugin | |
antigen bundle git | |
# use custom plugin | |
antigen bundle zsh-users/zsh-syntax-highlighting | |
antigen bundle zsh-users/zsh-autosuggestions |
<?php | |
use PhpCsFixer\Config; | |
use PhpCsFixer\Finder; | |
$rules = [ | |
'array_syntax' => ['syntax' => 'short'], | |
'binary_operator_spaces' => [ | |
'default' => 'single_space', | |
'operators' => ['=>' => null] |
name: Build & Publish | |
on: | |
push: | |
branches: | |
- develop | |
schedule: | |
- cron: "0 2 * * 1-5" | |
jobs: |
<?php | |
namespace App\Listeners; | |
use TightenCo\Jigsaw\Jigsaw; | |
class GenerateIndex | |
{ | |
public function handle(Jigsaw $jigsaw) | |
{ |
#!/bin/bash | |
function f() { | |
sleep "$1" | |
echo "$1" | |
} | |
while [ -n "$1" ] | |
do | |
f "$1" & |
//Binary Search | |
import java.util.Scanner; | |
public class BinarySearch{ | |
public static int binarySearch(int a[], int key) { | |
int beg = 0, end = a.length-1; | |
int mid = (beg+end)/2; | |
while(beg<=end){ | |
if(key<a[mid]) |
//Binary search | |
#include<iostream> | |
#include<algorithm> | |
using namespace std; | |
int binary_search(int a[], int size, int key) { | |
int beg = 0, end = size-1; | |
int mid = (beg+end)/2; |
//Linear Search | |
import java.util.Scanner; | |
public class LinearSearch{ | |
public static int linearSearch(int a[], int key) { | |
for(int i=0;i<a.length;i++) | |
if(a[i] == key) | |
return i+1; | |
return 0; |