Skip to content

Instantly share code, notes, and snippets.

View stavrossk's full-sized avatar
🎯
Focusing

Stavros Skamagkis stavrossk

🎯
Focusing
View GitHub Profile
@stavrossk
stavrossk / PHP code line number display.php
Created August 14, 2013 16:02
PHP Snippet: Code line number display: This snippet displays code line numbers and alternating line colours.
<?php
function lineCount($code)
{
$lines = explode("\n",htmlentities($code));
$i = 1;
@stavrossk
stavrossk / Array of sub-directories of a directory.php
Last active December 20, 2015 22:08
PHP: An array of sub-directories of a directory.
<?php
function listdir($dir)
{
if ( $handle = opendir($dir) )
{
$output = array();
@stavrossk
stavrossk / NeoSmart NeoGrub BootLoader configuration.lst
Last active December 20, 2015 14:58 — forked from mqudsi/menu.lst
NeoSmart NeoGrub bootloader configuration file.
# NeoSmart NeoGrub Bootloader Configuration File
#
# This is the NeoGrub menu.lst file, and should be located at x:\NST\menu.lst
# (where x = your "system" partition i.e. the one containing all of the boot files)
# Please see the EasyBCD Documentation for information on how to create/modify entries
# http://neosmart.net/wiki/display/EBCD
default 0
timeout 10
@iheanyi
iheanyi / NowArrayAdapter.java
Last active February 10, 2019 17:32
Google Now Cards Layout XML. list_item.xml can be customized to your heart's content . . . Also, you can implement the following with DragSortListView for swiping to delete, reordering, and whatnot.
import java.util.ArrayList;
import java.util.List;
import android.content.Context;
import android.graphics.Typeface;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ArrayAdapter;
import android.widget.TextView;
@myano
myano / irc_games.md
Last active March 24, 2025 00:45
This is a list of games that are playable on IRC.

List of on-IRC games

AlphaChat

  • #multirpg

BakaShiMoe

@nzakas
nzakas / gist:5511916
Created May 3, 2013 17:47
Using GitHub inside a company

I'm doing some research on how companies use GitHub Enterprise (or public GitHub) internally. If you can help out by answering a few questions, I'd greatly appreciate it.

  1. What is the primary setup? Is there an organization and each official repo is owned by that organization?
  2. Does every engineer have a fork of each repo they're working on?
  3. Are engineers allowed to push directly to the official repo? Or must all commits go through a pull request?
  4. Do engineers work on feature branches on the main repo or on their own forks?
  5. Do you require engineers to squash commits and rebase before merging?
  6. Overall, what is the workflow for getting a new commit into the main repository?
  7. What sort of hooks do you make use of?
  8. Are there any ops issues you encountered? (Scaling, unforeseen downtime, etc.)
@stavrossk
stavrossk / JSON array object.htm
Last active December 16, 2015 09:19
JSON array object creation in JavaScript.
<html>
<head>
<title>
Creation of array object in javascript using JSON
</title>
@stavrossk
stavrossk / Book list example.json
Last active December 16, 2015 09:09
An example of a book list written in JSON.
{
"book":
[
{
"id":"01",
"language": "Java",
"edition": "third",
@stavrossk
stavrossk / DEMOSTHeNES text-to-speech system API usage example.txt
Last active December 16, 2015 03:09
An example of how to send data to the free DEMOSTHeNES Speech Composer text-to-speech system.
/*************************************************************************/
/* You have the right to use this code or modify it for non-commercial */
/* purposes or other profitable activities. */
/*************************************************************************/
/* Author: Gerasimos Xydas ([email protected]) */
/* Date: February 2003 */
/*************************************************************************/
/* */
/* An example of how to send data to the free */
/* DEMOSTHeNES Speech Composer text-to-speech system. */