This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Copyright 2014-present [Ricard Sole <@rcsole, ricard.solecasas@gmail.com>] | |
#include <cstdio> | |
#include "./Game.h" | |
bool Game::init(const char* title, int xpos, int ypos, int width, | |
int height, int flags) { | |
if (SDL_Init(SDL_INIT_EVERYTHING) == 0) { | |
printf("SDL_Init success\n"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class Dosificador { | |
private $name; | |
public function getName() { | |
return $this->name; | |
} | |
public function setName($name) { | |
$this->name = $name; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<style> | |
pre { | |
height: 25px; | |
overflow: hidden; | |
} | |
.expanded { | |
height: auto; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// A simple Particle class | |
window.Particle = function(position, acceleration) { | |
this.acceleration = createVector(0, acceleration || 0.15); | |
this.velocity = createVector(random(-1, 1), random(-1, 0)); | |
this.position = position.copy(); | |
this.lifespan = 255.0; | |
}; | |
Particle.prototype.run = function() { | |
this.update(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function() { | |
function artistElement(artist) { | |
var img = artist.images[0] || { url: 'http://placehold.it/64x64' } | |
return ` | |
<div class="media artist" data-id="${artist.id}"> | |
<div class="media-left"> | |
<img class="media-object" src="${img.url}" /> | |
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
author: @grumpylion | |
description: does the calculations with the punchcard variable as input | |
*/ | |
import java.io.BufferedReader; | |
import java.io.IOException; | |
import java.io.InputStreamReader; | |
import java.util.Arrays; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.io.BufferedReader; | |
import java.io.IOException; | |
import java.io.InputStreamReader; | |
import java.util.Arrays; | |
public class funciones { | |
private static BufferedReader stdin = new BufferedReader(new InputStreamReader(System.in)); | |
public int how_many_times(String movies_array[][], String rent_array[][]) throws IOException { | |
String input, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
## author @grumpylionking | |
createuser() | |
{ | |
echo "desired user name: " | |
read user | |
echo "desired group name: " | |
read group |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
## author : Ricard Sole Casas | |
## description : Script that captures input by nfc-list and does what you tell it to do | |
## twitter : @codinglion | |
## github : http://github.com/codinglion | |
## gist : http://gist.github.com/codinglion | |
while true; do | |
input=`nfc-list | grep UID | cut -d ":" -f 2 | sed 's/ //g'` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ sudo apt-get install samba | |
$ sudo vi /etc/samba/smb.conf | |
# look for workgroup = WORKGROUP and change WORKGROUP for the workgroup name you set up on Windows | |
# look for the line #security = user and uncomment it | |
# save and exit | |
$ sudo echo -e "[sharedfolder]\n\tpath = /path/to/share/folder\n\tbrowsable = yes\n\tguest ok = no\n\tread only = yes\n\tcreate mask = 0755" >> /etc/samba/smb.conf | |
$ sudo smbpasswd -a `whoami` | |
$ sudo restart smbd && sudo restart nmbd |
OlderNewer