Skip to content

Instantly share code, notes, and snippets.

View javiersantos's full-sized avatar

Javier Santos javiersantos

View GitHub Profile
@javiersantos
javiersantos / telegram-installer.sh
Last active March 8, 2022 11:05 — forked from jalcaldea/telegram-installer.sh
Install Telegram for Deskop (Linux)
#!/bin/bash
echo "============================================="
echo "== Telegram Script Installer v 0.1 =="
echo "== =="
echo "== by Jalcaldea =="
echo "============================================="
echo "Downloading necesary files..."
@javiersantos
javiersantos / check-apc-module.php
Last active August 29, 2015 14:07
Check if a specific PHP module is installed
<?php
/*
* Check if APC Module is installed
* By Javier Santos
* https://gist.github.com/javiersantos/575929cc9985d0195fc0
*/
if (extension_loaded('apc')) {
echo "true";
@javiersantos
javiersantos / Uppercase.java
Last active August 29, 2015 14:08
Return the uppercase letters of a string
/*
* Return the uppercase letters of a string. Useful to return an acronym.
* By Javier Santos
* https://gist.github.com/javiersantos/58b7aa21338082d6c850
*/
public String getUppercase(String str) {
String res = "";
String[] split = str.split(" ");
@javiersantos
javiersantos / currentChromeTab.js
Last active August 21, 2022 12:34
Get the current URL of the selected Chrome tab. Useful for Chrome/Chromium extensions.
/*
* Get the current URL of the selected Chrome tab. Call to getCurrent
* By Javier Santos
* https://gist.github.com/javiersantos/c3e9ae2adba72e898f99
*/
var currentURL;
chrome.tabs.query({'active': true, 'windowId': chrome.windows.WINDOW_ID_CURRENT},
function(tabs){
@javiersantos
javiersantos / redmine_hash_password.php
Created July 21, 2015 08:35
Create Redmine User Password
<?php
$plain_password = 'password';
$user_salt = '';
$hash = sha1('#' . $user_salt . '#' . sha1($plain_password));
echo $hash . "\n";
?>
@javiersantos
javiersantos / button_circular.xml
Last active August 29, 2015 14:27
A circular button for Android. Apply the layout using android:background="@drawable/button_circular".
<?xml version="1.0" encoding="utf-8"?>
<shape
xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle"
android:padding="10dp">
<solid
android:width="3dp"
android:color="@android:color/white" />