Skip to content

Instantly share code, notes, and snippets.

View vigo's full-sized avatar
🕶️
I may be slow to respond.

Uğur Özyılmazel vigo

🕶️
I may be slow to respond.
View GitHub Profile
@cougarwww
cougarwww / django-uwsgi-reload.py
Created December 15, 2012 17:59
python: django uwsgi autoreload
import uwsgi
from uwsgidecorators import timer
from django.utils import autoreload
@timer(3)
def change_code_gracefull_reload(sig):
if autoreload.code_changed():
uwsgi.reload()
@ttscoff
ttscoff / marky.rb
Created June 20, 2012 17:02
Ruby script for interfacing with Marky the Markdonwifier
#!/usr/bin/env ruby
require 'open-uri'
require 'net/http'
require 'iconv'
require 'optparse'
require 'fileutils'
require 'cgi'
$options = {}
@bamthomas
bamthomas / pub_sub_redis.py
Created November 28, 2012 22:16
Pub/Sub redis python
from multiprocessing.process import Process
import time
import redis
def pub(myredis):
for n in range(10):
myredis.publish('channel','blah %d' % n)
time.sleep(5)
def sub(myredis, name):
SEI ;Disable interrupts
NOP
NOP
LDA #7F
STA DC0D ;Mask CIA1's interrupt generator
SEI
LDA #08 ;Set the KERNAL's interrupt vector
STA 0315 ;at $0314/$0315
LDA #B0 ;to $08B0.
@vitalyisaev2
vitalyisaev2 / channel_test.go
Last active July 27, 2020 11:18
Golang buffered channel vs blocking channel performance
/*
BenchmarkBufferedChannel-4 5000 267997 ns/op
BenchmarkBlockingChannel-4 3000 388019 ns/op
*/
package performance_test
import (
"math/rand"
"testing"
)
@ssg
ssg / DEDEKTIF.BAS
Created October 6, 2016 00:09
Dedektif - A simple adventure/RPG-like game I wrote back in 1989 for Amstrad CPC464. This is the oldest code I wrote that I was able to scavenge from my tapes.
10 SPEED KEY 17,2
20 CLS:INK 0,0:BORDER 0:PAPER 0
30 MODE 1:INK 1,29:PEN 1:INK 2,13:INK 3,20
40 DIM I$(15),DT(15),DY$(15),SS(15),ESGY$(15):RESTORE 250
50 FOR N=1 TO 15
60 READ I$(N),DT(N),DY$(N),SS(N),ESGY$(N)
70 NEXT N
80 OK=0:YOU=0:KLL=0:FOUND=0:MONEY=1000000:CEPTEKI=0:MIDE=10:KATIL=INT(RND*15):IF KATIL<1 THEN 80
90 KATIL1=INT(RND*15):IF KATIL1<1 THEN 90
100 KATIL2=INT(RND*15):IF KATIL2<1 THEN 100
@armonge
armonge / fields.py
Created July 18, 2011 14:41
A Django custom modelfield, formfield and formwidget to select and save a set of geographic coordinates using Google Maps
class GoogleMapMarker(object):
def __init__(self, latitude, longitude):
self.latitude = latitude
self.longitude = longitude
def __unicode__(self):
return '%f,%f'%(self.latitude, self.longitude)
def __len__(self):
return len(self.__unicode__())
@carljm
carljm / runner.py
Created December 9, 2011 04:07
Unittest2 test discovery and real dotted-path named test selection for Django
"""
An alternative Django ``TEST_RUNNER`` which uses unittest2 test discovery from
a base path specified in settings, rather than requiring all tests to be in
``tests`` module of an app.
If you just run ``./manage.py test``, it'll discover and run all tests
underneath the ``TEST_DISCOVERY_ROOT`` setting (a path). If you run
``./manage.py test full.dotted.path.to.test_module``, it'll run the tests in
that module (you can also pass multiple modules).
@c1982
c1982 / inline_struct.go
Last active December 27, 2020 14:53
Benchmarks for inline, outline, anonymous struct
package main
import (
"encoding/json"
"testing"
)
type PD2 struct {
Property1 int `json:"property1"`
Property2 int `json:"property2"`
Modern Web Uygulamaları ve Performans
https://kommunity.com/frontend-istanbul/events/modern-web-uygulamalari-ve-performans-3c61fed8
Rıza Selçuk Saydam ile "Facebook'ta Tasarım ve İşe Alım Süreçleri
https://open.spotify.com/episode/0obHOgbbE4tRDZsJ05OZxD?si=_M9TQ9flRn6tRMXc2p8HTA&nd=1
Tüm ülkece rahatlayabiliriz. Garanti 3D secure ekrenı değişmiş.
https://twitter.com/oguzguc/status/1356127686423425026
Woke up this morning and found this new lovely interface upgrade! ✨