Skip to content

Instantly share code, notes, and snippets.

View TomiToivio's full-sized avatar

Tomi Toivio TomiToivio

View GitHub Profile
William Gibson
Neuromancer
Dedication:
for Deb
who made it possible
with love
@TomiToivio
TomiToivio / wp-permissions-script
Created April 6, 2019 22:31 — forked from macbleser/wp-permissions-script
WordPress Permissions Configuration Script
#!/bin/bash
#
# This script configures WordPress file permissions based on recommendations
# from http://codex.wordpress.org/Hardening_WordPress#File_permissions
#
# Author: Michael Conigliaro
#
WP_OWNER=changeme # <-- wordpress owner
WP_GROUP=changeme # <-- wordpress group
WP_ROOT=/home/changeme # <-- wordpress root directory
@tntmeijs
tntmeijs / unitythreedimensionalperlinnoise.cs
Last active February 19, 2024 01:52
A 3D implementation using the 2D Perlin noise function of Unity3D.
public static float Noise3D(float x, float y, float z, float frequency, float amplitude, float persistence, int octave, int seed)
{
float noise = 0.0f;
for (int i = 0; i < octave; ++i)
{
// Get all permutations of noise for each individual axis
float noiseXY = Mathf.PerlinNoise(x * frequency + seed, y * frequency + seed) * amplitude;
float noiseXZ = Mathf.PerlinNoise(x * frequency + seed, z * frequency + seed) * amplitude;
float noiseYZ = Mathf.PerlinNoise(y * frequency + seed, z * frequency + seed) * amplitude;
anonymous
anonymous / dump.csv
Created April 8, 2017 21:24
Parsed out compromised hosts from #ShadowBrokers
ID Host IP Address Year Month Day Implant Version OS
PITCHIMPAIR ns1.youngdong.ac.kr 202.30.58.5 1969 12 31 INCISION 1.1.2.1 hppa2.0w-hp-hpux11.00
INTONATION tx.micro.net.pk 203.135.2.194 2000 8 17 JACKLADDER 2.0 sparc-sun-solaris2.7
INTONATION hakuba.janis.or.jp 210.232.42.3 2000 8 22 JACKLADDER 2.0 sparc-sun-solaris2.6
INTONATION mail.interq.or.jp 210.157.0.87 2000 8 24 JACKLADDER 2.0 sparc-sun-solaris2.6
INTONATION mx1.freemail.ne.jp 210.235.164.21 2000 8 28 JACKLADDER ? i386-pc-solaris2.7
INTONATION webnetra.entelnet.bo 166.114.10.28 2000 8 30 JACKLADDER 2.0 sparc-sun-solaris2.6
INTONATION opcwdns.opcw.nl 195.193.177.150 2000 9 6 JACKLADDER 2.0 sparc-sun-solaris2.6
INTONATION rayo.pereira.multi.net.co 206.49.164.2 2000 9 20 JACKLADDER 2.0 sparc-sun-solaris2.6
INTONATION most.cob.net.ba 195.222.48.5 2000 9 21 JACKLADDER 2.0 sparc-sun-solaris2.6
@mlocati
mlocati / exceptions-tree.php
Created March 9, 2017 10:58
Throwable and Exceptions tree
<?php
if (!function_exists('interface_exists')) {
die('PHP version too old');
}
$throwables = listThrowableClasses();
$throwablesPerParent = splitInParents($throwables);
printTree($throwablesPerParent);
if (count($throwablesPerParent) !== 0) {
die('ERROR!!!');
@Yousha
Yousha / .gitignore
Last active May 10, 2024 07:52
.gitignore for PHP developers.
##### Windows
# Windows thumbnail cache files
Thumbs.db
Thumbs.db:encryptable
ehthumbs.db
ehthumbs_vista.db
# Dump file
*.stackdump
@TomiToivio
TomiToivio / tulostinkartta.php
Last active May 23, 2016 15:36
Tulostinkartta
<?php
/*
Plugin Name: 3D-Tarvike Tulostinkartta
Plugin URI: http://tulostimet.3d-tarvike.fi/
Description: 3D-Tarvike Tulostinkartta
Version: 1.0
Author: Tomi Toivio
Author URI: http://sange.fi/
License: GPL2
*/
anonymous
anonymous / testi.stl
Created March 11, 2016 17:59
STL Gist
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@RyanAtViceSoftware
RyanAtViceSoftware / fiddle.html
Last active July 18, 2019 18:48
Hello React - component lifecycle - updating events. JsFiddle: http://jsfiddle.net/gh/gist/library/pure/c709657dc3584cb5962b
<script src="https://fb.me/react-with-addons-0.14.0.js"></script>
<script src="https://fb.me/react-dom-0.14.0.js"></script>
<div id="view"/>
@RyanAtViceSoftware
RyanAtViceSoftware / fiddle.html
Last active July 18, 2019 18:38
Hello React - composite components - accessing childern. JsFiddle: http://jsfiddle.net/gh/gist/library/pure/1345be9f31298888d99a
<script src="https://fb.me/react-with-addons-0.14.0.js"></script>
<script src="https://fb.me/react-dom-0.14.0.js"></script>
<div id="view"/>