This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#sample found by @JohnLaTwc | |
#$WebPostTimer = 1200 | |
#$WebGetTimer = 1200 | |
[void] [Reflection.Assembly]::LoadWithPartialName("System.Windows.Forms") | |
[void] [Reflection.Assembly]::LoadWithPartialName("System.Drawing") | |
function New-Mutex($MutexName) { | |
#[CmdletBinding()][OutputType([PSObject])] | |
#Param ([Parameter(Mandatory)][ValidateNotNullOrEmpty()][string]$MutexName) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def trim(v) | |
v & 0xffffffff | |
end | |
def scramble(v) | |
v ^= 0x1ca7bc5b | |
v *= 0x1ca7bc5b | |
v = trim(v) | |
v = ((v >> 1) & 0x55555555) | trim((v & 0x55555555) << 1) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Original code: Jeffrey Way (https://gist.github.com/JeffreyWay/5112282) | |
* Modified for Laravel 5 and to use closure: soufiane EL HAMCHI (https://gist.github.com/soufianeEL/3f8483f0f3dc9e3ec5d9) | |
* and Ferri Sutanto (https://gist.github.com/ghprod/0bb7f8d207ba7838a0e6) | |
* Uses meta csrfToken and meta csrfParam based on: https://github.com/rails/jquery-ujs/blob/master/src/rails.js | |
* | |
* Examples : | |
* <a href="posts/2" data-method="delete"> | |
* - Or, request confirmation in the process - | |
* <a href="posts/2" data-method="delete" data-confirm="Are you sure?"> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Check if a given ip is in a network | |
* @param string $ip IP to check in IPV4 format eg. 127.0.0.1 | |
* @param string $range IP/CIDR netmask eg. 127.0.0.0/24, also 127.0.0.1 is accepted and /32 assumed | |
* @return boolean true if the ip is in this range / false if not. | |
*/ | |
function ip_in_range( $ip, $range ) { | |
if ( strpos( $range, '/' ) == false ) { | |
$range .= '/32'; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# | |
# | |
# Usage | |
# This script do nothing, it juste show files that are scanned or not by | |
# Logstash and plugin File. 3 outputs | |
# | |
# ./utilSinceDB.sh | |
# ./utilSinceDB.sh | grep "not found in sincedb" | |
# ./utilSinceDB.sh | grep "to delete" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- (TTStyle*)imageThumbView:(UIControlState)state { | |
TTBoxStyle* boxStyle = [TTBoxStyle styleWithMargin:UIEdgeInsetsMake(4, 4, 4, 4) next:nil]; | |
TTStyle* imageStyle = [TTImageStyle styleWithImageURL:nil | |
defaultImage:nil | |
contentMode:UIViewContentModeScaleAspectFit | |
size:CGSizeZero next:boxStyle]; | |
TTPartStyle* imagePart = [TTPartStyle styleWithName:@"image" style:imageStyle next:nil]; | |
TTStyle* contentStyle = [TTContentStyle styleWithNext:imagePart]; | |
TTStyle* fillStyle = [TTSolidFillStyle styleWithColor:hexColor(0xcccccc) next:contentStyle]; | |
TTStyle* whiteBorder = [TTSolidBorderStyle styleWithColor:hexColor(0xffffff) width:2 next:fillStyle]; |