Skip to content

Instantly share code, notes, and snippets.

@cmendible
cmendible / kubectl_ubuntu_wsl.sh
Created November 16, 2019 22:02
Install kubectl on ubuntu (WSL) and use kubectl config from Windows
#!/bin/bash
# Receives your Windows username as only parameter.
curl -LO https://storage.googleapis.com/kubernetes-release/release/v1.16.0/bin/linux/amd64/kubectl
chmod +x ./kubectl
sudo mv ./kubectl /usr/local/bin/kubectl
windowsUser=$1
@igorjs
igorjs / rest-api-response-format.md
Last active April 11, 2025 12:51
REST API response format based on some of the best practices
@stiig
stiig / dpd_service.php
Last active September 10, 2016 18:53
Integration with DPD service calculate with small fixes / Немного исправленная интеграция с сервисами калькулятора DPD
<?php
class DPD_service
{
public $arMSG = array(); // массив-сообщение ('str' => текст_сообщения, 'type' => тип_сообщения (по дефолту: 0 - ошибка)
private $IS_ACTIVE = 1; // флаг активности сервиса (0 - отключен, 1 - включен)
private $IS_TEST = 1; // флаг тестирования (0 - работа, 1 - тест)
private $SOAP_CLIENT; // SOAP-клиент
private $MY_NUMBER = '111111111111'; // ЗАМЕНИТЬ НА СВОЙ!!! - клиентский номер в системе DPD (номер договора с DPD)
private $MY_KEY = 'AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA'; // ЗАМЕНИТЬ НА СВОЙ!!! - уникальный ключ для авторизации
@webcane
webcane / index.html
Last active December 10, 2015 09:18 — forked from anonymous/index.html
<!doctype html>
<html>
<head>
<meta charset="UTF-8" />
<style type="text/css">
/* reset */
html, body, div, span, applet, object, iframe,
h1, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, em, font, img, ins, kbd, q, s, samp,
anonymous
anonymous / index.html
Created December 30, 2012 14:59
css3 github ribbon
<!doctype html>
<html>
<head>
<meta charset="UTF-8" />
<style type="text/css">
/* reset */
html, body, div, span, applet, object, iframe,
h1, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, em, font, img, ins, kbd, q, s, samp,
@digitaljhelms
digitaljhelms / gist:4287848
Last active April 24, 2025 20:31
Git/GitHub branching standards & conventions

Branching

Quick Legend

Description, Instructions, Notes
Instance Branch
@webcane
webcane / Q17
Created November 20, 2012 07:13
OCA-JP-7 PT1 Q17
// What will be the output of trying to compile and run the following piece of code?
public class Fruit {
public void eatMe() throws Exception {
System.out.print("Eat a fruit");
}
public static void main (String [] args) {
Fruit f = new Mango();
f.eatMe();
}