Skip to content

Instantly share code, notes, and snippets.

View ninetails's full-sized avatar
🏳️‍⚧️
traaa

Nina Kitsu ninetails

🏳️‍⚧️
traaa
View GitHub Profile
import java.util.Scanner;
public class ExercicioUm
{
public static void main(String args[])
{
Scanner input = new Scanner(System.in);
int in, max;
System.out.println("Digite 3 números inteiros:");
@ninetails
ninetails / README.md
Last active February 8, 2016 01:47
my personal cheat sheet

Making this for my personal use.

For Markdown Syntax Cheat Sheet, access here. And for Github Flavored, here.

@ninetails
ninetails / check_daylight.php
Created December 10, 2013 20:43
PHP code to check if Daylight Saving Time is currently active
<?php
1 === intval(date('I', time()), 10)
@ninetails
ninetails / purge.sh
Created January 11, 2014 18:58
Bash to clean vagrant boxes
#!/bin/bash
# Credits to:
# - http://vstone.eu/reducing-vagrant-box-size/
# - https://github.com/mitchellh/vagrant/issues/343
aptitude -y purge ri
aptitude -y purge installation-report landscape-common wireless-tools wpasupplicant ubuntu-serverguide
aptitude -y purge python-dbus libnl1 python-smartpm python-twisted-core libiw30
aptitude -y purge python-twisted-bin libdbus-glib-1-2 python-pexpect python-pycurl python-serial python-gobject python-pam python-openssl libffi5
@ninetails
ninetails / gulpfile.js
Created February 22, 2014 01:06
Getting gulp tutorial and adding compass+sass and coffeescript
gulp = require('gulp')
plugins = require('gulp-load-plugins')()
server = require('tiny-lr')()
path = require('path')
gulp.task('styles', function(){
return gulp.src('./src/sass/*.sass')
.pipe(plugins.compass({
style: 'expanded',
css: 'dist/assets/css',
@ninetails
ninetails / gist:9278524
Created February 28, 2014 19:54
How to run docker with port forwarding & mounting folder
docker run -d -p 8080:80 -v /home/carlos/workspace:/var/www:ro tagname
@ninetails
ninetails / Dockerfile
Created March 7, 2014 02:09
docker with CentOS+LAMP (PHP 5.5 + Apache 2.4)
FROM centos
MAINTAINER Ninetails - Carlos Kazuo
RUN rpm -Uvh http://mirror.webtatic.com/yum/el6/latest.rpm
RUN curl -s http://repos.fedorapeople.org/repos/jkaluza/httpd24/epel-httpd24.repo > /etc/yum.repos.d/epel-httpd24.repo
RUN yum install -y xterm git mysql mysql-server httpd24-httpd php55w php55w-common php55w-cli mysql mysql-server php55w-devel php55w-mcrypt php55w-mbstring php55w-mysqlnd php55w-pdo php55w-pecl-xdebug php55w-xml php55w-xmlrpc php55w-opcache
RUN /sbin/chkconfig --add httpd
RUN /sbin/chkconfig httpd on --level 235
@ninetails
ninetails / publicidade.js
Created March 30, 2014 02:39
this is a test that I will delete soon
/*! jQuery v1.8.3 jquery.com | jquery.org/license */
if ( typeof jQuery === 'undefined' ) {
(function(e,t){function _(e){var t=M[e]={};return v.each(e.split(y),function(e,n){t[n]=!0}),t}function H(e,n,r){if(r===t&&e.nodeType===1){var i="data-"+n.replace(P,"-$1").toLowerCase();r=e.getAttribute(i);if(typeof r=="string"){try{r=r==="true"?!0:r==="false"?!1:r==="null"?null:+r+""===r?+r:D.test(r)?v.parseJSON(r):r}catch(s){}v.data(e,n,r)}else r=t}return r}function B(e){var t;for(t in e){if(t==="data"&&v.isEmptyObject(e[t]))continue;if(t!=="toJSON")return!1}return!0}function et(){return!1}function tt(){return!0}function ut(e){return!e||!e.parentNode||e.parentNode.nodeType===11}function at(e,t){do e=e[t];while(e&&e.nodeType!==1);return e}function ft(e,t,n){t=t||0;if(v.isFunction(t))return v.grep(e,function(e,r){var i=!!t.call(e,r,e);return i===n});if(t.nodeType)return v.grep(e,function(e,r){return e===t===n});if(typeof t=="string"){var r=v.grep(e,function(e){return e.nodeType===1});if(it.test(t))return v.filter(t,
╭∩╮(︶︿︶)╭∩╮
ლ(ಠ益ಠლ)
┌∩┐(◣_◢)┌∩┐
¯\_(ツ)_/¯
(っ-●益●)っ ~~
@ninetails
ninetails / gist:10069406
Created April 7, 2014 22:33
Gist for check redirects
var util = require('util'),
fs = require('fs'),
net = require('net'),
filename = './redir.txt',
useragents = [
{
name: 'Chrome 33.0.1750.152',
value: 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/33.0.1750.152 Safari/537.36'
},
{