Skip to content

Instantly share code, notes, and snippets.

View serdarsen's full-sized avatar

Serdar ŞEN serdarsen

View GitHub Profile
@serdarsen
serdarsen / combo.py
Created May 22, 2018 13:42 — forked from Furao/combo.py
Prevent a Combobox from scrolling in PyGTK
def combo_scrolling(combobox, event):
"""Prevent the comboboxes from scrolling."""
combobox.emit_stop_by_name("scroll-event")
values = ['item 1', 'item 2', 'item 3']
combo = gtk.combo_box_new_text()
# Fill with part type options
for val in values:
@serdarsen
serdarsen / my-pygtk-listview-sample.md
Last active June 23, 2018 18:31
My pygtk ListView sample app

ListView Sample

ListView.py

#!/usr/bin/python3
@serdarsen
serdarsen / Grid
Created June 14, 2018 20:23 — forked from lithid/Grid
Here is a grid using python and GTK3, loading dynamically based on window size/re-size. I came up with this example while trying to mimic a gridview of images for a wallpaper application. The example is below.
#!/usr/bin/env python2
from gi.repository import Gtk
class Grid(Gtk.Window):
widget_list = []
WIDGET_SIZE = 140
COLS = 1
NUM = 100
def calcule_columns(self, scroll, grid):
@serdarsen
serdarsen / my-python3-json-write-read-sample.md
Last active June 23, 2018 18:30
This sample, demonstrates how to write and read a python dict data as a json object to a file

My Python3 Json Write Read Sample

This sample, demonstrates how to write and read a python dict data as a json object to a file


As a result Local State file

{
@serdarsen
serdarsen / InheritanceSample.vala
Created May 22, 2019 04:29
Inheritance Sample of Vala - Calling base class constructure
// The code below can be run and test in https://tio.run/#vala
public class Vehicle
{
public Vehicle(string text)
{
print("Vehicle %s", text);
}
}
@serdarsen
serdarsen / DoubleToStringSample.vala
Created May 25, 2019 01:21
Double to string sample of vala : Calling a string property that contains "DoubleToString" result from base class
// The code below can be run and test in https://tio.run/#vala
public class Vehicle
{
public double Speed {get; set;}
public string SpeedText
{
owned get{return DoubleToString(Speed, "%.0f");}
}
@serdarsen
serdarsen / linebreak.md
Created July 21, 2019 15:17
Line breaks in markdown
Hello  (<-- two spaces)
World

Hello
World


Keep it simple

Find second largest number in the array

import java.util.Arrays;

public class Main {
    public static void main(String[] args) {
        int[] nums = {1, 4, -3, 20, 7, 10};

Introduction

This document presents possible causes and solutions for "RCP failed http 400 error" that occurs while pushing a project using heroku cli.

Disclaimer

I didn't encounter this error and didn't change the default buffer size, I just gathered useful resources and shared the output of the sample running react-todo on heroku. Please be careful in troubleshooting and backup your project.

Resource

Below I list the most relevant resources on the subject.

  1. Everything you need to know to resolve the Git Push RPC error: