Skip to content

Instantly share code, notes, and snippets.

View sarbull's full-sized avatar
🌀
Software Engineer who's older than Google.

Cezar Sîrbu sarbull

🌀
Software Engineer who's older than Google.
View GitHub Profile
@sarbull
sarbull / versioned-custom-element.html
Created April 16, 2019 10:53
HTML Custom Element with version tag
<!DOCTYPE html>
<html>
<head>
<title>Title of the document</title>
</head>
<body>
<simple-component-0-0-4 first="Cezar" last="Sirbu"></simple-component-0-0-4>
<script>
@sarbull
sarbull / BoostIT.java
Last active December 8, 2017 21:57 — forked from boostit/gist:5a884a68e222ebbe8731296e33fcdf94
Can you spot the errors in the code? Tell us in the comments below.
class BoostIT implements Angajeaza {
public static String XP_LEVEL = "Senior";
public Set<Senior> seniors = new HashSet<Senior>;
public Set Cautam(List<Developer> devs) {
for (Developer d : devs) {
if (d.stieJava().equals(XP_LEVEL)) {
seniors.add(d);
}
}
function CallAPI($method, $url, $data = false)
{
$curl = curl_init();
switch ($method)
{
case "POST":
curl_setopt($curl, CURLOPT_POST, 1);
if ($data)
@sarbull
sarbull / pairs.js
Last active September 24, 2017 20:00
function pairs(array, k) {
var hash = {};
var length = array.length;
var result = [];
for(var i = 0; i < length; i++) {
if(hash[array[i]]) {
hash[array[i]]++;
} else {
hash[array[i]] = 1;
#
# /etc/smsd.conf
#
# Description: Main configuration file for the smsd
#
devices = GSM1
outgoing = /var/spool/sms/outgoing
checked = /var/spool/sms/checked
incoming = /var/spool/sms/incoming
@sarbull
sarbull / java-streams.java
Created October 10, 2016 11:51
Java Streams
package learning;
import java.util.*;
public class Main {
public static void main(String [] args) {
System.out.println("Hello world!");
List<String> myList = Arrays.asList("a1", "a2", "c3", "c5", "cezar", "ana", "constanta");
var singleton = (function () {
var instance;
function init() {
function privateMethod(){
console.log( "I am private" );
}
var privateVariable = "I am a private variable";
var privateRandomNumber = Math.random();