Skip to content

Instantly share code, notes, and snippets.

🖥
C64/Amiga Scener/Coder

Uğur Özyılmazel vigo

🖥
C64/Amiga Scener/Coder
Block or report user

Report or block vigo

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@varver
varver / .Title
Created Nov 29, 2016 — forked from congjf/.Title
Using MongoDB in golang with mgo
View .Title
Using MongoDB in golang with mgo
@delameko
delameko / upgrade-postgres-9.5-to-9.6.md
Last active Sep 26, 2019 — forked from johanndt/upgrade-postgres-9.3-to-9.5.md
Upgrading PostgreSQL from 9.5 to 9.6 on Ubuntu 16.04
View upgrade-postgres-9.5-to-9.6.md

TL;DR

Install Postgres 9.6, and then:

sudo pg_dropcluster 9.6 main --stop
sudo pg_upgradecluster 9.5 main
sudo pg_dropcluster 9.5 main
@Integralist
Integralist / Python ignore pylint flake8 errors.md
Last active Nov 14, 2019
[Python ignore pylint and flake8 linter errors] #tags: python, linter, ignore, pylint, flake8
View Python ignore pylint flake8 errors.md

Disable all linting across the entire file:

# pylint: disable-all (older)
# pylint: skip-file   (newer)
# flake8: noqa

Disable specific linting errors across the entire file:

@simonw
simonw / sql_replace_in_django_orm.py
Last active Aug 8, 2019
How to use the SQL replace function in a Django ORM query
View sql_replace_in_django_orm.py
from django.db.models import F, Func, Value
from myapp.models import MyModel
# Annotation
MyModel.objects.filter(description__icontains='\r\n').annotate(
fixed_description=Func(
F('description'),
Value('\r\n'), Value('\n'),
function='replace',
)
@ozdemirburak
ozdemirburak / cities_of_turkey.json
Last active Nov 1, 2019
List of cities in Turkey presented in JSON format with the information of name, latitude, longitude, population and region.
View cities_of_turkey.json
[
{
"id": 1,
"name": "Adana",
"latitude": "37.0000",
"longitude": "35.3213",
"population": 2183167,
"region": "Akdeniz"
},
{
@Boerworz
Boerworz / main.go
Last active Aug 21, 2019
Capturing the HTTP status code from http.ResponseWriter
View main.go
package main
import (
"fmt"
"log"
"net/http"
)
func main() {
// We need to cast handleRoot to a http.HandlerFunc since wrapHandlerWithLogging
@17twenty
17twenty / gist:2fb30a22141d84e52446
Created Feb 22, 2016
POST with NewRequest using Golang
View gist:2fb30a22141d84e52446
package main
import (
"bytes"
"fmt"
"io/ioutil"
"log"
"net/http"
"net/url"
)
View OreDev_Conferences_Videos.json
{
"total": 1007,
"pages": [
{
"page": 1,
"videos": [
{
"name": "Explore IOT Business Scenarios and their Technology Architectures",
"href": "https://vimeo.com/182739791",
"duration": "44:07",
@luchoching
luchoching / mgo-json-http.go
Last active Jul 31, 2018
Golang mgo REST json example
View mgo-json-http.go
package main
import (
"encoding/json"
"gopkg.in/mgo.v2"
"gopkg.in/mgo.v2/bson"
"net/http"
)
type Person struct {
@erdimeola
erdimeola / est3d.py
Last active Nov 7, 2019
Python - EST 3D Secure Integration
View est3d.py
#!/usr/bin/python
# -*- coding: utf-8 -*-
from django.shortcuts import redirect
from django.http import HttpResponse
import requests, hashlib, base64, time
EST_MERCHANT_ID = "400000200"
EST_3D_KEY = "TRPS0200"
EST_RETURN_URL = "http://test.domain.com/basarili"
EST_FAIL_URL = "http://test.domain.com/basarisiz"
You can’t perform that action at this time.