Skip to content

Instantly share code, notes, and snippets.

@Batou99
Batou99 / apue.h
Created April 11, 2011 14:00
apue.h
/* Our own header, to be included before all standard system headers */
#ifndef _APUE_H
#define _APUE_H
#if defined(SOLARIS)
#define _XOPEN_SOURCE 500 /* Single UNIX Specification, Version 2 for Solaris 9 */
#define CMSG_LEN(x) _CMSG_DATA_ALIGN(sizeof(struct cmsghdr)+(x))
#elif !defined(BSD)
#define _XOPEN_SOURCE 600 /* Single UNIX Specification, Version 3 */
@zpea
zpea / html5_video_conv.bash
Created July 21, 2012 03:00
little shell script to convert video files to the various HTML5 video formats/codecs using ffmpeg. Also generates the line for embedding the video using the videoJS plugin for wordpress.
#!/bin/bash
#
# video conversion script for publishing as HTML 5 video, via videojs (with hd button extension)
# 2011 by zpea
# feel free to use as public domain / Creative Commons CC0 1.0 (http://creativecommons.org/publicdomain/zero/1.0/)
#
FFMPEG=/usr/bin/ffmpeg
HD_SUFFIX='_hd'
@Atem18
Atem18 / gist:4696071
Last active April 19, 2024 11:18 — forked from evildmp/gist:3094281
Tutorial to seting up a django website in production.

Set up Django, Nginx and Gunicorn in a Virtualenv controled by Supervisor

Steps with explanations to set up a server using:

  • Virtualenv
  • Virtualenvwrapper
  • Django
  • Gunicorn
@majkrzak
majkrzak / snake.asm
Created August 1, 2014 16:38
Snake like game writen in x86 real mode assembly.
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; ;;
;; ;;;;;; ;;;;;; ;;
;; ;; ;; ;; ;;
;; ;; ;; ;;;;;; ;;; ;; ;; ;; ;; ;;; ;; ;; ;;;;;; ;;
;; ;;;;;; ;; ;; ;; ;; ;;;;;;; ;;; ;; ;; ;; ;; ;; ;; ;;
;; ;; ;; ;;;;; ;; ;; ;; ;; ;; ; ;; ;; ;; ;;;; ;;;;;; ;;
;; ;; ;; ;; ;;;;;;; ;; ;; ;; ;;; ;;;;;;; ;; ;; ;; ;;
;; ;; ;; ;;;;;; ;; ;; ;;;;;; ;;;;;; ;; ;; ;; ;; ;; ;; ;;;;;; ;;
;; ;;
@mandiwise
mandiwise / Sync gh-pages + master branches
Last active April 27, 2024 05:41
Keep gh-pages up to date with a master branch
// Reference: http://lea.verou.me/2011/10/easily-keep-gh-pages-in-sync-with-master/
$ git add .
$ git status // to see what changes are going to be commited
$ git commit -m 'Some descriptive commit message'
$ git push origin master
$ git checkout gh-pages // go to the gh-pages branch
$ git rebase master // bring gh-pages up to date with master
$ git push origin gh-pages // commit the changes
@roachhd
roachhd / README.md
Last active July 18, 2024 07:24
Basics of BrainFuck

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

BrainFuck Programming Tutorial by: Katie

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

INTRODUCTION

.fadeinDown {
-webkit-animation: fadeInDown 500ms ease-in-out; /* Chrome, Safari, Opera */
animation: fadeInDown 500ms ease-in-out;
}
/* Chrome, Safari, Opera */
@-webkit-keyframes fadeInDown {
0% {
@xmfcx
xmfcx / Voice-Controlled-IoT.md
Last active January 6, 2022 14:06
OK Google, Arduino Uno, ESP8266, Blynk, IFTTT, Google Assistant Integration Tutorial

OK Google, Arduino Uno, ESP8266, Blynk, IFTTT, Google Assistant Integration Tutorial

This is a tutorial to realize following video: https://www.youtube.com/watch?v=PBiOGvJRPqg

Requirements:

  • Android phone Marsmallow or higher or Apple phone (for google assistant)
  • IFTTT app
  • Blynk app
  • Arduino UNO
  • ESP8266 Wifi module
@Sanix-Darker
Sanix-Darker / Create_your_free_onion_website_on_Tor_network.sh
Last active November 7, 2023 12:37
Create your free onion website on Tor network
#Creating an .onion service in the Tor network is as simple as editing /etc/tor/torrc and adding:
HiddenServiceDir /var/lib/tor/www_service/
HiddenServicePort 80 127.0.0.1:80
# After restarting the tor service with
sudo service tor restart
# or
sudo service tor reload
# The directory will be created automagically, and inside the new directory, two files are generated, hostname and private_key.
@ty-porter
ty-porter / bot.py
Created March 14, 2020 18:32
Reddit bot for generating a CSV file for stale moderators
from bs4 import BeautifulSoup
import csv
import datetime
import praw
import requests
import traceback
import sys
BOT_USERNAME = 'BOT_USERNAME'