Skip to content

Instantly share code, notes, and snippets.

View VictorCoding's full-sized avatar
💭
Breaking shit

Victor Ramos VictorCoding

💭
Breaking shit
  • Brownsville
View GitHub Profile
@VictorCoding
VictorCoding / UploadCircle.css
Created September 12, 2015 22:21
CSS circle for when uploading an image on drag and drop
.center-circle, .upload-circle {
margin: 0 auto;
margin-top: calc(50% - 300px);
}
.abs, .upload-circle:before, .upload-circle:after {
position: absolute;
top: 0;
bottom: 0;
left: 0;
@VictorCoding
VictorCoding / gist:20868ff717ab37a01a25
Created November 22, 2015 18:42
FileSync's write template
<!-- <span ng-show="w.FilesToWriteTo.length < 1" class="text-danger">Add some files please before trying anything dumb....Yo cheeky monkey :)</span>
<form name="filePathsForm">
<div class="form-group">
<textarea class="form-control" placeholder="Type here to once, write to ALL!" ng-model="w.TextToWrite"></textarea><br>
<div class="btn-group">
<button type="button" class="btn btn-default" ng-click="w.paste('content')">Paste</button>
<button type="button" class="btn btn-primary" ng-click="w.writeToAll(w.TextToWrite)">Write Bitch!</button>
</div>
</div>
<div class="form-group">
/*
Text to display
<div class="dot first"></div>
<div class="dot second"></div>
<div class="dot third"></div>
*/
@VictorCoding
VictorCoding / logWithLabel.js
Created March 1, 2016 22:42 — forked from tkh44/logWithLabel.js
Little utility to format logs in a consistent manner
const a = { foo: 'bar' };
const b = 'I like cookies';
export const logWithLabel = (content, label, collapsed = false) => {
if (__DEVELOPMENT__) {
content = Array.isArray(content) ? content : [content];
console[collapsed ? 'groupCollapsed' : 'group'](label.toUpperCase());
content.forEach((c) => {
"み".charCodeAt(0).toString(16);
class MatchWhenAuthorized extends Component {
constructor(props) {
super();
console.log(props);
this.props = props;
this.state = {
isAuthenticated: false,
}
class Particle {
x = Math.random() * canvas.width;
y = Math.random() * canvas.height;
vx = Math.random();
vy = Math.random();
id;
life = 0;
maxLife = 40;
constructor() {
@VictorCoding
VictorCoding / sphere.js
Created January 2, 2017 01:11
sphere drawn in canvas
const gradient = ctx.createRadialGradient(50, 30, 0, 40, 40, 50);
gradient.addColorStop(0, 'white');
gradient.addColorStop(1, 'black');
ctx.fillStyle = gradient;
ctx.beginPath();
ctx.arc(40, 40, 40, 0, Math.PI * 2);
ctx.fill();
import { Component } from '@angular/core';
import { DeviceMotion, AccelerationData } from 'ionic-native';
import { NavController, Platform } from 'ionic-angular';
Array['max'] = (array) => Math.max.apply(Math, array);
Array['min'] = (array) => Math.min.apply(Math, array);
@Component({
selector: 'page-home',
@VictorCoding
VictorCoding / main.js
Created January 26, 2017 18:20
angular2 form
const fields = [
{
label: 'First Name',
name: 'firstName',
required: true,
maxLength: 55
},
{
label: 'Last Name',
name: 'lastName',