Skip to content

Instantly share code, notes, and snippets.

Avatar
:octocat:
:)

Cosmin Popescu cosminpopescu14

:octocat:
:)
View GitHub Profile
@cosminpopescu14
cosminpopescu14 / main.cs
Created Mar 22, 2020 — forked from gistlyn/main.cs
Simple OrmLite CRUD demo
View main.cs
using System;
using System.Collections.Generic;
using ServiceStack;
using ServiceStack.Text;
using ServiceStack.OrmLite;
using ServiceStack.OrmLite.Sqlite;
using ServiceStack.DataAnnotations;
public class User
{
View keyword_extract_with_weight.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@cosminpopescu14
cosminpopescu14 / main.go
Created Aug 14, 2019 — forked from geosoft1/main.go
Simple blockchain example
View main.go
package main
import (
"crypto/sha256"
"encoding/hex"
"strconv"
"time"
)
type Data struct {
View Output HashMap with JSF 2.2
Methode 1
<p:dataTable var="entry" value="#{hashMap.entrySet().toArray()}">
<p:column headerText="key">
<h:outputText value="${entry.key}" />
</p:column>
<p:column headerText="value id">
<h:outputText value="${entry.value.id}" />
</p:column>
</p:dataTable>
@cosminpopescu14
cosminpopescu14 / .htaccess
Created Dec 9, 2018 — forked from ScottPhillips/.htaccess
Common .htaccess Redirects
View .htaccess
#301 Redirects for .htaccess
#Redirect a single page:
Redirect 301 /pagename.php http://www.domain.com/pagename.html
#Redirect an entire site:
Redirect 301 / http://www.domain.com/
#Redirect an entire site to a sub folder
Redirect 301 / http://www.domain.com/subfolder/
@cosminpopescu14
cosminpopescu14 / squash.php
Created May 30, 2018 — forked from woganmay/squash.php
Use PHP to flatten a multidimensional stdClass object (like a json_decode result)
View squash.php
<?php
function squash($array, $prefix = '')
{
$flat = array();
$sep = ".";
if (!is_array($array)) $array = (array)$array;
foreach($array as $key => $value)
@cosminpopescu14
cosminpopescu14 / curl-post.php
Created Apr 16, 2018 — forked from lesstif/curl-get.php
PHP CURL POST example
View curl-post.php
<?php
class Log {
public static function debug($str) {
print "DEBUG: " . $str . "\n";
}
public static function info($str) {
print "INFO: " . $str . "\n";
}
}
You can’t perform that action at this time.