Skip to content

Instantly share code, notes, and snippets.

View 64lines's full-sized avatar

Julian Alexander Murillo 64lines

  • Universidad Politécnica de Cartagena
  • Cartagena, Murcia - Spain
View GitHub Profile
@64lines
64lines / sinusoidal_wave.html
Last active October 21, 2015 18:29
Algorithmic Art - Senoidal Wave
<html>
<head>
</head>
<body>
<canvas id="object-canvas" width="1920" height="1080">
<script>
function randomNumber(start, end) {
return Math.floor((Math.random() * end) + start)
}
@64lines
64lines / Extract Links.sh
Last active September 10, 2015 15:22
BASH - Extract all the external links of a web page and save them to a file
@64lines
64lines / parse_arrays.java
Last active August 5, 2016 05:06
[JAVA] - Parse List of Longs to arrays
List<Long> items = new ArrayList<>();
for (String item : items)
{
negItems.add(Longs.tryParse(item));
}
return Longs.toArray(negItems);
@64lines
64lines / .vimrc
Last active August 5, 2016 05:03
Basic .vimrc file
syntax on
set nu " Enable number lines"
set showcmd
set incsearch
set hlsearch
set autoindent
" Source a global configuration file if available
if filereadable("/etc/vim/vimrc.local")
source /etc/vim/vimrc.local
endif
@64lines
64lines / use_case_basic.txt
Last active August 5, 2016 05:02
Use Case Basic Structure
Title: What is the goal?
Actor: Who desires it?
Scenario: How is it accomplished? (Steps to archieve the goal)
Extensions: Alternative work flows
@64lines
64lines / Convert Links To Images.js
Last active April 5, 2016 01:02
[JQUERY] - Convert all links in the page to images
@64lines
64lines / verify_request.py
Last active August 5, 2016 04:57
[PYTHON] - Request verification
from urllib2 import Request, urlopen, HTTPError
import sys
url = sys.argv[1].strip()
req = Request(url)
print url
try:
response = urlopen(req)
except HTTPError as e:
print e.code
@64lines
64lines / ExecuteShellComand.java
Last active August 5, 2016 04:56
Execute shell command
import java.io.BufferedReader;
import java.io.InputStreamReader;
public class ExecuteShellComand {
public static void main(String[] args) {
ExecuteShellComand obj = new ExecuteShellComand();
String domainName = "google.com";
//in mac oxs
@64lines
64lines / Show Alert.java
Last active August 5, 2016 04:59
Show Toast Alert with Android
private void showAlert(String text, int duration) {
Context context = getApplicationContext();
Toast toast = Toast.makeText(context, text, duration);
toast.show();
}
@64lines
64lines / MySQL connection.java
Last active August 5, 2016 04:58
Java Database Connection to MySQL
String URL = "jdbc:mysql://localhost:5004/test";
try {
Connection conn = DriverManager.getConnection (URL, "username", "password");
Statement statement = conn.createStatement();
ResultSet resultSet = statement.executeQuery("select * from tweet_post;");
while(resultSet.next()) {
System.out.println(resultSet.getString("id") + "\t" + resultSet.getString("tweet"));
}
} catch (SQLException ex) {