Skip to content

Instantly share code, notes, and snippets.

View murilomenezescosta's full-sized avatar

Kouz murilomenezescosta

View GitHub Profile
@migf1
migf1 / s_new_from_stdin.c
Last active September 25, 2024 23:32
Read portably a string of arbitrary length from the console in C ( ANSI C89 / ISO C90 ).
#include <stdio.h> /* getchar() */
#include <stdlib.h> /* malloc(), realloc() */
#include <string.h> /* memcpy() */
/* -----------------------------------------------
* Create a new string (NUL-terminated array of chars) by reading the stdin.
* Return the newly created string, or NULL on error.
* Args:
* int beExact: If 0 (false), then the size of the created string will
* be an exact multiple of the internally used alloc-ahead
@zhouji
zhouji / persistence.xml
Created April 20, 2013 04:43
persistence.xml for eclipse link and mongodb.
<persistence
xmlns="http://java.sun.com/xml/ns/persistence"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd"
version="2.0">
<persistence-unit name="pu" >
<provider>org.eclipse.persistence.jpa.PersistenceProvider</provider>
<exclude-unlisted-classes>false</exclude-unlisted-classes>
<properties>
@halyph
halyph / persistence.xml
Created June 25, 2012 19:39
persistence.xml MySQL settings
<persistence xmlns="http://java.sun.com/xml/ns/persistence"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd"
version="2.0">
<persistence-unit name="org.hibernate.tutorial.jpa" transaction-type="RESOURCE_LOCAL">
<description>
Persistence unit for the JPA tutorial of the Hibernate Getting Started Guide
</description>
<provider>org.hibernate.ejb.HibernatePersistence</provider>
@kevinSuttle
kevinSuttle / meta-tags.md
Last active March 13, 2026 04:06 — forked from lancejpollard/meta-tags.md
List of Usable HTML Meta and Link Tags