Skip to content

Instantly share code, notes, and snippets.

View mantask's full-sized avatar

Mantas Kanaporis mantask

View GitHub Profile
@mosabua
mosabua / AndroidInsecureKeepAliveHttpsTransportSE
Created April 7, 2011 15:51
AndroidInsecureHttpsServiceConnectionSE implements the service connection that will allow any SSL cert on Android 2.1 (api level 7) and below, this disables SSL for old platform version, be careful
import org.ksoap2.transport.HttpsTransportSE;
import org.ksoap2.transport.ServiceConnection;
import java.io.IOException;
public class AndroidInsecureKeepAliveHttpsTransportSE extends HttpsTransportSE {
private AndroidInsecureHttpsServiceConnectionSE conn = null;
private final String host;
private final int port;
@bickart
bickart / repair.php
Created April 26, 2013 15:29
How to perform a SugarCRM Quick Repair and Rebuild from the line
#!/usr/bin/php
<?php
/*
* Copyright 2013
* Jeff Bickart
* @bickart
* jeff @ neposystems.com
*/
@spinegar
spinegar / Joe_______'s SugarCRM Cheat Sheet
Last active July 30, 2019 03:32
Joe_______'s SugarCRM Cheat Sheet
Sugarwiki
Adding a Field to the Modules Subpanels „ Popup Search “ definitions
Code way:
1. Use metadata/popupdefs.php (custom folder, if there is none copy original)
2. Seek section searchdefs' => array(…)
3. Add field to searchdefs
Or Studio way:
Admin > Studio > Contacts > Layouts > PopupView > Popup Search
Subpanel Query Change with custom fields
@koenpunt
koenpunt / chosen-bootstrap.css
Last active March 11, 2023 01:01
Bootstrap 3.0 theme for Chosen
select.form-control + .chosen-container.chosen-container-single .chosen-single {
display: block;
width: 100%;
height: 34px;
padding: 6px 12px;
font-size: 14px;
line-height: 1.428571429;
color: #555;
vertical-align: middle;
background-color: #fff;
@Graceas
Graceas / FormErrorsSerializer.php
Created September 10, 2013 06:26
Symfony 2 Form Error Serializer. May be used for AJAX form validation. Allows tree and flat array styles for errors.
class FormErrorsSerializer {
public function serializeFormErrors(\Symfony\Component\Form\Form $form, $flat_array = false, $add_form_name = false, $glue_keys = '_')
{
$errors = array();
$errors['global'] = array();
$errors['fields'] = array();
foreach ($form->getErrors() as $error) {
$errors['global'][] = $error->getMessage();
@tleish
tleish / mysql_backup.sh
Last active May 28, 2024 04:55
Bash Script to backup all MySQL databases
#!/bin/bash
#==============================================================================
#TITLE: mysql_backup.sh
#DESCRIPTION: script for automating the daily mysql backups on development computer
#AUTHOR: tleish
#DATE: 2013-12-20
#VERSION: 0.4
#USAGE: ./mysql_backup.sh
#CRON:
# example cron for daily db backup @ 9:15 am
@chadrien
chadrien / README.md
Last active September 1, 2023 12:43
Debug PHP in Docker with PHPStorm and Xdebug

Debug your PHP in Docker with Intellij/PHPStorm and Xdebug

  1. For your local dev, create a Dockerfile that is based on your production image and simply install xdebug into it. Exemple:
FROM php:5

RUN yes | pecl install xdebug \
&amp;&amp; echo "zend_extension=$(find /usr/local/lib/php/extensions/ -name xdebug.so)" &gt; /usr/local/etc/php/conf.d/xdebug.ini \
@tzmartin
tzmartin / embedded-file-viewer.md
Last active June 10, 2024 10:28
Embedded File Viewer: Google Drive, OneDrive

Office Web Apps Viewer

('.ppt' '.pptx' '.doc', '.docx', '.xls', '.xlsx')

http://view.officeapps.live.com/op/view.aspx?src=[OFFICE_FILE_URL]

<iframe src='https://view.officeapps.live.com/op/embed.aspx?src=[OFFICE_FILE_URL]' width='px' height='px' frameborder='0'>
</iframe>

OneDrive Embed Links

@EdOverflow
EdOverflow / github_bugbountyhunting.md
Last active May 22, 2024 09:01
My tips for finding security issues in GitHub projects.

GitHub for Bug Bounty Hunters

GitHub repositories can disclose all sorts of potentially valuable information for bug bounty hunters. The targets do not always have to be open source for there to be issues. Organization members and their open source projects can sometimes accidentally expose information that could be used against the target company. in this article I will give you a brief overview that should help you get started targeting GitHub repositories for vulnerabilities and for general recon.

Mass Cloning

You can just do your research on github.com, but I would suggest cloning all the target's repositories so that you can run your tests locally. I would highly recommend @mazen160's GitHubCloner. Just run the script and you should be good to go.

$ python githubcloner.py --org organization -o /tmp/output
@duboisf
duboisf / zscaler_ufw.txt
Last active January 18, 2024 19:05
ufw rules to get zscaler working on linux
sudo ufw allow in on zcctun0 proto any from 10.0.0.0/8 to 100.64.0.1 port 9000
sudo ufw allow in on zcctun0 proto any from 100.64.0.0/16 to 100.64.0.1 port 9000
sudo ufw allow in on zcctun0 proto any from 100.64.0.0/16 to 100.64.0.1 port 9010
sudo ufw allow in on zcctun0 proto udp from 100.64.0.0/16 to 100.64.0.1