Skip to content

Instantly share code, notes, and snippets.

View holysheep's full-sized avatar

Alexandra holysheep

  • Utrecht, Netherlands
View GitHub Profile
docker exec -i kind-1-control-plane patch --directory=/etc/kubernetes/manifests <<EOF
--- kube-apiserver.yaml.orig 2018-10-10 12:58:56.739231422 -0700
+++ kube-apiserver.yaml 2018-10-10 13:12:41.832606463 -0700
@@ -18,7 +18,7 @@
- --allow-privileged=true
- --client-ca-file=/etc/kubernetes/pki/ca.crt
- --disable-admission-plugins=PersistentVolumeLabel
- - --enable-admission-plugins=NodeRestriction
+ - --enable-admission-plugins=NodeRestriction,PodPreset,NamespaceLifecycle,NamespaceExists,ResourceQuota
- --enable-bootstrap-token-auth=true
import json
import time
import urllib.request
import pandas as pd
# Option 1 with urlload
start0 = time.time()
json_objects = []
for json_object in urllib.request.urlopen("https://storage.googleapis.com/xcc-de-assessment/events.json"):
package im.dlg.push
import Update
import org.junit.After
import org.junit.Before
import org.junit.Rule
import org.junit.Test
import org.junit.rules.TemporaryFolder
import java.io.File
import java.io.FileOutputStream
public class DialogGcmListenerService extends GcmListenerService {
private static final String TAG = "DialogGcmListenerService";
@Override
public void onMessageReceived(String from, Bundle data) {
Log.d(TAG, "Message received #" + data.toString());
Log.d(TAG, "from #" + from);
if (!data.isEmpty()) {
@holysheep
holysheep / expand-collapse.java
Created December 10, 2015 04:20 — forked from ZkHaider/expand-collapse.java
Simple Expand / Collapse RecyclerView Item
public static class ExampleViewHolder extends RecyclerView.ViewHolder
implements View.OnClickListener {
private int originalHeight = 0;
private boolean isViewExpanded = false;
private YourCustomView yourCustomView
public ExampleViewHolder(View v) {
super(v);
v.setOnClickListener(this);
<canvas id="canvas"></canvas>
<script type="text/javascript">
var canvas = document.getElementById('canvas');
var context = canvas.getContext('2d');
Image img1 = new Image();
Image img2 = new Image();
img1.onload = function() {
canvas.width = img1.width;
canvas.height = img1.height;
var canvas = document.getElementById("canvas");
var ctx = canvas.getContext("2d");
var image1 = loadImage('http://твоя фоновая картинка', main);
var image2 = loadImage('http://qr код', main);
var imagesLoaded = 0;
function main() {
imagesLoaded += 1;
public void fill() {
if (topTabsTitles.getChildCount() > 0)
return;
Events.get(getActivity()).catalog().onProductOpened(product);
setUpPhotoPager();
setUpProductDetails();
setProductInfo();
<style type="text/css">
.atlwdg-trigger {
position: fixed;
background: #013466;
padding: 5px;
border: 2px solid white;
border-top: none;
font-weight: bold;
color: #577CBD;
display: block;
public class CronServiceTask implements PluginJob {
public static final String MAIL = "mail";
private MultiQueueTaskManager taskManager;
private SearchService searchService;
SearchResults searchResults;
public void execute(Map<String, Object> jobDataMap) {