Skip to content

Instantly share code, notes, and snippets.

@tamas-molnar
tamas-molnar / kubectl-shortcuts.sh
Last active June 19, 2024 14:10
aliases and shortcuts for kubectl
alias kc='kubectl'
alias kclf='kubectl logs --tail=200 -f'
alias kcgs='kubectl get service -o wide'
alias kcgd='kubectl get deployment -o wide'
alias kcgp='kubectl get pod -o wide'
alias kcgn='kubectl get node -o wide'
alias kcdp='kubectl describe pod'
alias kcds='kubectl describe service'
alias kcdd='kubectl describe deployment'
alias kcdf='kubectl delete -f'
@mraible
mraible / jhipster-blog.jh
Created June 12, 2016 11:28
JDL for JHipster Blog Demo
entity Blog {
name String required minlength(3),
handle String required minlength(2)
}
entity Entry {
title String required,
content String required,
date ZonedDateTime required
}
@drewrygh
drewrygh / safe-http.ts
Created May 30, 2016 01:33
A HTTP module for Ionic apps that handles 'no network connection' errors in a friendly way.
import {Injectable} from 'angular2/core';
import {Http, Request, Response, RequestOptionsArgs} from 'angular2/http';
import {Alert, NavController} from 'ionic-angular';
import {Network, Connection} from 'ionic-native';
@Injectable()
export class NetworkService {
public networkAlert: any;
@davimacedo
davimacedo / curl.sh
Last active June 23, 2021 21:33
Example of importing data with cloud functions. See a live example at https://www.back4app.com/database/davimacedo/parse-import-example
curl -X POST \
-H "X-Parse-Application-Id: LL9oIdzIkmwl5xyowQQu0fTmXyUWfet9RuAzwHfj" \
-H "X-Parse-REST-API-Key: R3S8PYQKuzeV4c8MUeO5ved46C50MEp56boDHW1O" \
-H "Content-Type: application/json" \
-d @data.json \
https://parseapi.back4app.com/functions/import
fernando@fernando-Vostro-5470:~$ curl start.spring.io
. ____ _ __ _ _
/\\ / ___'_ __ _ _(_)_ __ __ _ \ \ \ \
( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
\\/ ___)| |_)| | | | | || (_| | ) ) ) )
' |____| .__|_| |_|_| |_\__, | / / / /
=========|_|==============|___/=/_/_/_/
:: Spring Initializr :: https://start.spring.io
@Urbiwanus
Urbiwanus / gist:c1e456f889f53e940a11
Last active November 13, 2019 15:38
Cordova Paypal Integration AngularJS
app.factory('PaypalService', ['$q', '$ionicPlatform', 'shopSettings', '$filter', '$timeout', function ($q, $ionicPlatform, shopSettings, $filter, $timeout) {
var init_defer;
/**
* Service object
* @type object
*/
var service = {
@evancummings
evancummings / gist:9490189
Last active April 6, 2022 19:17
Watch network traffic from Android App
# Use ADB to find and pull an Android package from device
adb shell pm list packages
adb shell pm path com.package
adb pull /data/app/com.package.app.apk
# With APK local, can now adb push to device and run it
# Use tcpdump to log traffic to mon.txt
sudo tcpdump -A dst port 80 > mon.txt

tmux cheatsheet

As configured in my dotfiles.

start new:

tmux

start new with session name: