Skip to content

Instantly share code, notes, and snippets.

Avatar
🙃
Hard working

Özer ozergul

🙃
Hard working
View GitHub Profile
anonymous
anonymous / config.json
Created Sep 14, 2014
Bootstrap Customizer Config
View config.json
{
"vars": {},
"css": [
"dropdowns.less"
],
"js": [
"dropdown.js"
]
}
@cosenary
cosenary / index.php
Last active Jun 17, 2019
Instagram API login (with sessions)
View index.php
<?php
require '../src/Instagram.php';
use MetzWeb\Instagram\Instagram;
session_start();
if (isset($_SESSION['access_token'])) {
// user authentication -> redirect to media
header('Location: success.php');
View Pseudo-classes with JS - cheatsheet.js
:first-child i === 0
:last-child i === arr.length - 1
:only-child arr.length === 1
:nth-child(even) i % 2
:nth-child(odd) !(i % 2)
:nth-child(n) i === n - 1
:nth-last-child(n) i === arr.length - n
@NigelEarle
NigelEarle / Knex-Migrations-Seeding.md
Last active Dec 4, 2021
Migration and seeding instructions using Knex.js!
View Knex-Migrations-Seeding.md

Migrations & Seeding

What are migrations??

Migrations are a way to make database changes or updates, like creating or dropping tables, as well as updating a table with new columns with constraints via generated scripts. We can build these scripts via the command line using knex command line tool.

To learn more about migrations, check out this article on the different types of database migrations!

Creating/Dropping Tables

View GLSL-Noise.md

Generic 1,2,3 Noise

float rand(float n){return fract(sin(n) * 43758.5453123);}

float noise(float p){
	float fl = floor(p);
  float fc = fract(p);
	return mix(rand(fl), rand(fl + 1.0), fc);
}