Skip to content

Instantly share code, notes, and snippets.

View Begalov's full-sized avatar
🎯
Focusing

RUben Begalov

🎯
Focusing
View GitHub Profile
@yorikvanhavre
yorikvanhavre / io_import_fcstd.py
Last active July 17, 2023 20:43
Blender FreeCAD importer stub
# ##### BEGIN GPL LICENSE BLOCK #####
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
<?php
/*
(2014) Main source -> http://lancenewman.me/posting-a-photo-to-instagram-without-a-phone/
I just managed to sniff Instagram traffic and fixed the code
-- Have fun - batuhan.org - Batuhan Katırcı
--- for your questions, comment @ http://batuhan.org/instagram-photo-upload-with-php/
@DavidYKay
DavidYKay / simple_cb.py
Last active September 9, 2024 00:14
Simple color balance algorithm using Python 2.7.8 and OpenCV 2.4.10. Ported from: http://www.morethantechnical.com/2015/01/14/simplest-color-balance-with-opencv-wcode/
import cv2
import math
import numpy as np
import sys
def apply_mask(matrix, mask, fill_value):
masked = np.ma.array(matrix, mask=mask, fill_value=fill_value)
return masked.filled()
def apply_threshold(matrix, low_value, high_value):
@dimmduh
dimmduh / Nginx-1.7_vhost.conf
Last active November 15, 2023 17:09
Example nginx config for Yii 2 (advanced) for openserver
server {
listen %ip%:%httpport%;
listen %ip%:%httpsport% ssl;
server_name %host% %aliases%;
# if ($request_method !~* ^(GET|HEAD|POST)$ ){return 403;}
location ~ /\. {deny all;}
location / {
@willurd
willurd / web-servers.md
Last active September 24, 2024 12:33
Big list of http static server one-liners

Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.

Discussion on reddit.

Python 2.x

$ python -m SimpleHTTPServer 8000
@AngryLoki
AngryLoki / ies2cycles.py
Last active January 30, 2024 16:47
IES to Cycles addon for new nodetree system! It only works for trunk builds of blender 2.66 and later versions!!! Thread on blenderartists.org: http://blenderartists.org/forum/showthread.php?276063 Old outdated version (no rig) for official 2.66 release (old nodetrees): https://gist.github.com/Lockal/5313485
# ##### BEGIN GPL LICENSE BLOCK #####
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
@pcote
pcote / grease_pencil_scripting.py
Created October 23, 2011 18:06
An example of Python scripting using gease pencil scripting for Blender. A partial re-invention of the "Convert Grease Pencil" operator.
def make_basic_curve():
crv = bpy.data.curves.new("crv", type="CURVE")
crv_ob = bpy.data.objects.new("crv_ob", crv)
return crv, crv_ob
scnobs = bpy.context.scene.objects
pencil = bpy.data.grease_pencil[0]
for i, stroke in enumerate(pencil.layers[0].active_frame.strokes):