Skip to content

Instantly share code, notes, and snippets.

View chucktrukk's full-sized avatar

Charlie Madison chucktrukk

View GitHub Profile
@chucktrukk
chucktrukk / pint.json
Created January 14, 2023 12:57 — forked from JustSteveKing/pint.json
Laravel Pint configuration
{
"preset": "psr12",
"rules": {
"align_multiline_comment": true,
"array_indentation": true,
"array_syntax": true,
"blank_line_after_namespace": true,
"blank_line_after_opening_tag": true,
"combine_consecutive_issets": true,
"combine_consecutive_unsets": true,
@chucktrukk
chucktrukk / root.sh
Created October 27, 2016 05:02 — forked from Arinerron/root.sh
"Root" via dirtyc0w privilege escalation exploit (automation script) / Android (32 bit)
#!/bin/bash
# Give the usual warning.
clear;
echo "[INFO] Automated Android root script started.\n\n[WARN] Exploit requires sdk module \"NDK\".\nFor more information, visit the installation guide @ https://goo.gl/E2nmLF\n[INFO] Press Ctrl+C to stop the script if you need to install the NDK module. Waiting 10 seconds...";
sleep 10;
clear;
# Download and extract exploit files.
echo "[INFO] Downloading exploit files from GitHub...";
<?php
/**
* RPX Helper Class for JanRain Engage
* @author Andres Cordero
* @license MIT
* See http://www.opensource.org/licenses/mit-license.html
* if LICENSE file not present
* Make sure cURL is installed and allowed to initiate HTTPS connections
*/
@chucktrukk
chucktrukk / Excerpt.php
Created June 2, 2011 21:46 — forked from rthrash/Excerpt.php
A MODx filter for creating smart excerpts of long text passages
/**
* Excerpt
*
* Creates intro excerpts from long passages of text like a Ninja.
*
* @category snippet
* @version 1.0
* @license http://www.gnu.org/copyleft/gpl.html GNU Public License (GPL)
* @autohor Kevin Marvin, Ryan Thrash
* @internal @modx_category Content
function getLinkscape() {
lastRow = FindRows();
startRow = lastRow + 1;
var active_spreadsheet = SpreadsheetApp.getActiveSpreadsheet();
var utility_sheet = active_spreadsheet.getSheetByName("Utilities");
params = utility_sheet.getRange(5,3,7,3).getValues();
url = params[2][0];
AccessID = params[0][0];
secret = params[1][0];
method = "HMAC_SHA_1";
/*!
* jQuery simpleWidget - v0.1pre - 10/28/2010
* http://benalman.com/
*
* Copyright (c) 2010 "Cowboy" Ben Alman
* Dual licensed under the MIT and GPL licenses.
* http://benalman.com/about/license/
*/
(function($,undefined){
@chucktrukk
chucktrukk / USAGE.md
Created October 26, 2010 20:11 — forked from agaoglu/USAGE.md

CRUD requires jquery.deepjson.js to work so it should be included

<script type="text/javascript" src="js/jquery.deepjson.js"></script>

Then you can assign whatever's in crud.json to a variable or you can put crud.json into your evently directory and let couchapp push it to your application.

Simplest way to use it is

<?php
/**
* Convert a multi-dimensional array into a stdClass object.
*
* Example:
* $values = array('hello'=>'world');
*
* // Convert the array to an object
* array_to_object($values);
*
<?php
/**
* Convert a comma separated file into an associated array.
* The first row should contain the array keys.
*
* Example:
*
* @param string $filename Path to the CSV file
* @param string $delimiter The separator used in the file
* @return array
/*!
* jQuery TextChange Plugin
* http://www.zurb.com/playground/jquery-text-change-custom-event
*
* Copyright 2010, ZURB
* Released under the MIT License
*/
(function ($) {
$.event.special.textchange = {