Skip to content

Instantly share code, notes, and snippets.

View osbre's full-sized avatar
🇺🇦
#StandWithUkraine

Ostap Brehin osbre

🇺🇦
#StandWithUkraine
View GitHub Profile
@irachex
irachex / snow.js
Created December 16, 2011 17:40
snow.js
/*
Snow Fall 1 - no images - Java Script
Visit http://rainbow.arch.scriptmania.com/scripts/
for this script and many more
*/
// Set the number of snowflakes (more than 30 - 40 not recommended)
var snowmax=35;
// Set the colors for the snow. Add as many colors as you like
@lancejpollard
lancejpollard / meta-tags.md
Created March 5, 2012 13:54
Complete List of HTML Meta Tags

Copied from http://code.lancepollard.com/complete-list-of-html-meta-tags/

Basic HTML Meta Tags

<meta name="keywords" content="your, tags"/>
<meta name="description" content="150 words"/>
<meta name="subject" content="your website's subject">
<meta name="copyright"content="company name">
<meta name="language" content="ES">
@mikhailov
mikhailov / 0. nginx_setup.sh
Last active June 29, 2024 23:43
NGINX+SPDY with Unicorn. True Zero-Downtime unless migrations. Best practices.
# Nginx+Unicorn best-practices congifuration guide. Heartbleed fixed.
# We use latest stable nginx with fresh **openssl**, **zlib** and **pcre** dependencies.
# Some extra handy modules to use: --with-http_stub_status_module --with-http_gzip_static_module
#
# Deployment structure
#
# SERVER:
# /etc/init.d/nginx (1. nginx)
# /home/app/public_html/app_production/current (Capistrano directory)
#
@beweinreich
beweinreich / facebook_fanpage_parser.php
Created January 8, 2013 21:30
A Facebook fanpage feed parser built in PHP.
<?php
// Facebook Fanpage Parser
// Author: Brian Weinreich
// Company: Rounded
// Website: http://roundedco.com
// Make sure you read through this documentation before implementing!
// Head to https://developers.facebook.com/apps and create a new app
// Log in under Rounded Developments Facebook account (Ask Brian for creds if you don't know them)
@jareware
jareware / SCSS.md
Last active July 1, 2024 09:25
Advanced SCSS, or, 16 cool things you may not have known your stylesheets could do

⇐ back to the gist-blog at jrw.fi

Advanced SCSS

Or, 16 cool things you may not have known your stylesheets could do. I'd rather have kept it to a nice round number like 10, but they just kept coming. Sorry.

I've been using SCSS/SASS for most of my styling work since 2009, and I'm a huge fan of Compass (by the great @chriseppstein). It really helped many of us through the darkest cross-browser crap. Even though browsers are increasingly playing nice with CSS, another problem has become very topical: managing the complexity in stylesheets as our in-browser apps get larger and larger. SCSS is an indispensable tool for dealing with this.

This isn't an introduction to the language by a long shot; many things probably won't make sense unless you have some SCSS under your belt already. That said, if you're not yet comfy with the basics, check out the aweso

@fcingolani
fcingolani / import_csv_to_sqlite.php
Last active April 8, 2024 02:52
PHP function to import a CSV into an SQLite database. Creates a table if needed. Uses PDO.
<?php
function import_csv_to_sqlite(&$pdo, $csv_path, $options = array())
{
extract($options);
if (($csv_handle = fopen($csv_path, "r")) === FALSE)
throw new Exception('Cannot open CSV file');
if(!$delimiter)
$delimiter = ',';
@killercup
killercup / pandoc.css
Created July 3, 2013 11:31
Add this to your Pandoc HTML documents using `--css pandoc.css` to make them look more awesome. (Tested with Markdown and LaTeX.)
/*
* I add this to html files generated with pandoc.
*/
html {
font-size: 100%;
overflow-y: scroll;
-webkit-text-size-adjust: 100%;
-ms-text-size-adjust: 100%;
}
@JalfResi
JalfResi / revprox.go
Last active June 18, 2024 18:29
Simple reverse proxy in Go
package main
import(
"log"
"net/url"
"net/http"
"net/http/httputil"
)
func main() {
@tomkel5
tomkel5 / main.php
Created November 7, 2013 05:50
Example of Symfony Crawler
<?php
require_once 'vendor/autoload.php';
use Symfony\Component\DomCrawler\Crawler;
$html = '<!DOCTYPE html>
<html>
<body>
<table border="0" cellpadding="0" cellspacing="1">
<tr>
@rxaviers
rxaviers / gist:7360908
Last active July 6, 2024 15:52
Complete list of github markdown emoji markup

People

:bowtie: :bowtie: 😄 :smile: 😆 :laughing:
😊 :blush: 😃 :smiley: ☺️ :relaxed:
😏 :smirk: 😍 :heart_eyes: 😘 :kissing_heart:
😚 :kissing_closed_eyes: 😳 :flushed: 😌 :relieved:
😆 :satisfied: 😁 :grin: 😉 :wink:
😜 :stuck_out_tongue_winking_eye: 😝 :stuck_out_tongue_closed_eyes: 😀 :grinning:
😗 :kissing: 😙 :kissing_smiling_eyes: 😛 :stuck_out_tongue: