Skip to content

Instantly share code, notes, and snippets.

@Sourdoughnerd
Sourdoughnerd / foodstyle.css
Created Aug 25, 2015
Week 1 - Day 2 - Choose your own adventure
View foodstyle.css
h1 {
font-family: courier;
}
p {
color: rgb(200,218,218);
}
div p {
color: #000099;
}
i {
@mirekfranc
mirekfranc / proc_cpuinfo.pl
Last active Aug 25, 2015
get list of cpu flags for quick checking
View proc_cpuinfo.pl
use v5.10;
sub cpuinfo
{
my $flags;
open my $cpuinfo, "<", "/proc/cpuinfo" or die "failed to open /proc/cpuinfo: $!\n";
while (<$cpuinfo>)
{
if (/flags/)
View promise-loop-sequence.js
var urlList = model.getURLs();
var loadAndParse = function (url)
{
// both load() and parse() are promise based functions
return load(url).then(parse);
};
/**
* Allows for the sequentially calling of promise based functions by iterating over a list of
View test.py
import os
print(os.path.dirname(__file__))
@jcfr
jcfr / 2015-08-25_test_cmake_download_from_dropbox.cmake
Last active Aug 25, 2015
Simple CMake script to help Jorge identify issue with the version of CMake used to setup Slicer miniconda dashboard on MacOSX
View 2015-08-25_test_cmake_download_from_dropbox.cmake
#
# To run the script:
#
# cmake -DDEST=/home/jcfr -P 2015-08-25_test_cmake_download_from_dropbox.cmake
#
if(NOT EXISTS "${DEST}")
set(DEST ".")
endif()
@jainnitin
jainnitin / stash_slack_integration.md
Last active Aug 25, 2015 — forked from molaschi/stash_slack_integration.md
Integrate Stash with Slack using webhooks
View stash_slack_integration.md

This is a short article on how we integrate stash and slack

First of all i assume you have:

  • a working stash installation
  • a repository you to notify slack on pushes
  • stash user with administration priviledges
  • full access to the server (linux) where stash is installed on
  • a team configured on slack
  • slack user with administration priviledges
View user-initials.html
<html>
<head>
<title>User Initials</title>
<style>
/* Relevant Code */
.person {
display: table;
margin: 24px auto;
}
@bgulla
bgulla / python_simple_webserver.py
Created Aug 25, 2015
Python Webserver that serves up a flat HTML file.
View python_simple_webserver.py
#!/usr/bin/python
from BaseHTTPServer import BaseHTTPRequestHandler, HTTPServer
from time import gmtime, strftime
import sys,random,socket
PORT_NUMBER = 8000
HOSTNAME = socket.gethostname()
if len(sys.argv) > 1:
@metasmile
metasmile / TypedIterableCapabilty.h
Last active Aug 25, 2015
a macro for support ios9's new typed iterable.
View TypedIterableCapabilty.h
#if defined(__IPHONE_OS_VERSION_MAX_ALLOWED) && __IPHONE_OS_VERSION_MAX_ALLOWED >= 90000
#define __typed_iterable(iterablesCls, elementsType) iterablesCls<elementsType> *
#else
#define __typed_iterable(iterablesCls, elementsType) iterablesCls *
#endif
#if defined(__IPHONE_OS_VERSION_MAX_ALLOWED) && __IPHONE_OS_VERSION_MAX_ALLOWED >= 90000
#define __ktyped_iterable(iterablesCls, elementsType) iterablesCls<__kindof elementsType> *
#else
#define __ktyped_iterable(iterablesCls, elementsType) iterablesCls *
View tiled_loader.pde
import gifAnimation.*;
GifMaker gifExport;
int frames = 0;
int totalFrames = 120;
public void setup() {
smooth();
size(360, 360);
You can’t perform that action at this time.