Skip to content

Instantly share code, notes, and snippets.

View ip413's full-sized avatar
🎃

ip413 ip413

🎃
  • Poland
View GitHub Profile
@ip413
ip413 / attractors.py
Created February 20, 2021 22:03 — forked from ylegall/attractors.py
code for animating strange attractors in blender
import bpy
import bmesh
import random
from mathutils import Vector, noise, Matrix
from math import sin, cos, tau, pi, radians
from utils.interpolation import *
from easing_functions import *
frame_start = 1
total_frames = 120
@ip413
ip413 / 50_lines.pde
Created May 6, 2020 12:48 — forked from u-ndefine/50_lines.pde
Sketch of my generative art, "50 Lines"
float decel(float x) { // as an easing function
return 1-(x-1)*(x-1);
}
void setup() {
background(255);
size(750,750,P2D);
PImage img = loadImage("image.png");
strokeWeight(2);
noFill();
#!/bin/bash
# Script reads configuration values from Prestashop settings,
# and makes database dump into default prestashop backup folder (adminXYZ1234/backups).
function get_parameter_value() {
echo $(cat $PARAMETERS | grep $1 | awk '{print $3}' | sed -e "s/[',]//g")
}
PARAMETERS=../public_html/app/config/parameters.php
DB_NAME=$(get_parameter_value database_name)
-- Deleting all customer messages in prestashop written in Russian
-- Search for three most popular russian characters "о, е, а"
-- Deleting thread info from ps_customer_thread column
delete from
ps_customer_thread
where
id_customer_thread in (
select
id_customer_thread
@ip413
ip413 / AccessDump.py
Created May 30, 2017 09:14 — forked from mywarr/AccessDump.py
use mdbtools to convert .mdb to .sqlite and .csv
#!/usr/bin/env python
#
# AccessDump.py
# A simple script to dump the contents of a Microsoft Access Database.
# It depends upon the mdbtools suite:
# http://sourceforge.net/projects/mdbtools/
import sys, subprocess, os
DATABASE = sys.argv[1]
@ip413
ip413 / index.html
Last active May 26, 2021 10:41
App verison number generator from date and git commit hash
<html>
<head>
</head>
<span>
__APP_VERSION__
</span>
</html>
@ip413
ip413 / compress-png.sh
Last active December 8, 2016 15:09
Bash script for recursive optimization png files
#!/bin/bash
if [ -z "$1" ]
then echo "
Usage: script [directory] [change files]
Arguments:
directory - script take all jpg files from directory
change files - if true files will be changed, otherwise (default) then will not change any files (test run)
Requirements: optipng
@ip413
ip413 / compress-jpg.sh
Last active December 8, 2016 15:10
Bash script for recursive compress of jpg files
#!/bin/bash
if [ -z "$1" ] || [ -z "$2" ]
then echo "
Usage: script [directory] [quality] [change files]
Requirements: ImageMagic (convert, identify), jpegoptim
Arguments:
directory - script take all jpg files from directory
quality - jpg quality value (0-100); if file has higher quality will be processed lossy, otherwise lossless