Skip to content

Instantly share code, notes, and snippets.

View bitsmanent's full-sized avatar

Claudio Alessi bitsmanent

View GitHub Profile
@ozanyildiz
ozanyildiz / thread_project2
Created February 19, 2012 12:33
Example of Multithreading in C
#include <stdio.h>
#include <stdlib.h>
#include <pthread.h>
#define M 3
#define K 2
#define N 3
#define NUM_THREADS M * N
/* Global variables for threads to share */
@luetkemj
luetkemj / wp-query-ref.php
Last active May 25, 2024 10:56
WP: Query $args
// This gist is now maintained on github at https://github.com/luetkemj/wp-query-ref
<?php
/**
* WordPress Query Comprehensive Reference
* Compiled by luetkemj - luetkemj.github.io
*
* CODEX: http://codex.wordpress.org/Class_Reference/WP_Query#Parameters
* Source: https://core.trac.wordpress.org/browser/tags/4.9.4/src/wp-includes/query.php
*/
@pdesterlich
pdesterlich / nomi_italiani.txt
Last active January 6, 2024 11:15
lista nomi italiani
-- DISCLAIMER --
il presente elenco consiste in una raccolta di nomi presenti sul territorio italiano (non necessariamente "italiani")
viene generato prendendo processando automaticamente uno o più archivi anagrafici e non è controllato in alcun modo
è pertanto altamente possibile che ci siano errori o refusi
non è nè pretende di essere un elenco omnicomprensivo di tutti i nomi esistenti
----------------
abaco
abbondanza
abbondanzia
@liamcurry
liamcurry / gist:2597326
Created May 4, 2012 19:56
Vanilla JS vs jQuery

Moving from jQuery

Events

// jQuery
$(document).ready(function() {
  // code
})
@jonathanmoore
jonathanmoore / gist:2640302
Created May 8, 2012 23:17
Get the share counts from various APIs

Share Counts

I have always struggled with getting all the various share buttons from Facebook, Twitter, Google Plus, Pinterest, etc to align correctly and to not look like a tacky explosion of buttons. Seeing a number of sites rolling their own share buttons with counts, for example The Next Web I decided to look into the various APIs on how to simply return the share count.

If you want to roll up all of these into a single jQuery plugin check out Sharrre

Many of these API calls and methods are undocumented, so anticipate that they will change in the future. Also, if you are planning on rolling these out across a site I would recommend creating a simple endpoint that periodically caches results from all of the APIs so that you are not overloading the services will requests.

Twitter

@ion1
ion1 / irc_formatting_characters.md
Created May 26, 2012 01:35
IRC formatting characters

IRC formatting characters

\x02bold
\x03color (mIRC extension, followed by FG or FG,BG where FG and BG consist of one or two digits)
\x0freset (mIRC extension)
\x12reverse
\x1funderline
@thiago-negri
thiago-negri / Edsl.hs
Created August 15, 2012 00:57
Simple EDSL to test a calculator
module Edsl where
--
-- Imports
import Control.Monad.Trans.State.Lazy
(State, evalState, modify, get)
import Data.Char
(toLower)
@markusfisch
markusfisch / README.md
Last active January 21, 2023 15:15
Handy shell script that eases building and running Android apps from the command line with ant and adb

Handy Android shortcuts

This little script eases building, running, testing and analyzing Android apps with [ant][2] and [adb][1].

You may also see it as interactive dictionary of useful [adb commands][1].

How to use

@plentz
plentz / nginx.conf
Last active July 27, 2024 16:11
Best nginx configuration for improved security(and performance)
# to generate your dhparam.pem file, run in the terminal
openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048
@XVilka
XVilka / TrueColour.md
Last active July 9, 2024 23:28
True Colour (16 million colours) support in various terminal applications and terminals

THIS GIST WAS MOVED TO TERMSTANDARD/COLORS REPOSITORY.

PLEASE ASK YOUR QUESTIONS OR ADD ANY SUGGESTIONS AS A REPOSITORY ISSUES OR PULL REQUESTS INSTEAD!