Skip to content

Instantly share code, notes, and snippets.

View devarda's full-sized avatar
💻

Arda devarda

💻
View GitHub Profile
@devarda
devarda / iOS messages export.sh
Created July 20, 2020 00:55 — forked from John07/iOS messages export.sh
Get all your messages (SMS and iMessage) from your iOS device without jailbreak or proprietary tools. Assumes you have an encrypted backup of your iOS device on your Mac.
# Note: this is not a fully functioning script! You will need to edit paths and other variables manually and it's adviced to run each command manually one after another
# install dependencies
# http://www.securitylearn.net/tag/deep-analysis-of-itunes-backup/
sudo ARCHFLAGS='-arch i386 -arch x86_64' easy_install pycrypto
sudo easy_install M2crypto construct progressbar
# clone the decrypt tool source code
# hg stands for mercurial
hg clone https://code.google.com/p/iphone-dataprotection/
@devarda
devarda / cmd.sh
Created April 22, 2020 14:18 — forked from kelvinn/cmd.sh
Example of using Apache Bench (ab) to POST JSON to an API
# post_loc.txt contains the json you want to post
# -p means to POST it
# -H adds an Auth header (could be Basic or Token)
# -T sets the Content-Type
# -c is concurrent clients
# -n is the number of requests to run in the test
ab -p post_loc.txt -T application/json -H 'Authorization: Token abcd1234' -c 10 -n 2000 http://example.com/api/v1/locations/
@devarda
devarda / 0-Clean-up-brew-php.sh
Last active March 2, 2020 16:56 — forked from idleberg/Install-Mcrypt.md
Mac OSX PHP Extensions 10.15 Catalina
# Will show you any php packages you've got. make not of that!
brew list | grep php
# Will uninstall any php packages you may have
brew list | grep php | while read x; do brew uninstall --force $x; done
# You may need to run this too
rm -rf /usr/local/Cellar/php
# Clean up Launch Agents
rm ~/Library/LaunchAgents/homebrew.mxcl.php*
sudo rm /Library/LaunchDaemons/homebrew.mxcl.php*
brew untap homebrew/php
@devarda
devarda / my.cnf
Created February 28, 2020 14:46 — forked from rohityadavcloud/my.cnf
Example MySQL my.cnf optimized
[client]
port = 3306
socket = /var/run/mysqld/mysqld.sock
# This was formally known as [safe_mysqld]. Both versions are currently parsed.
[mysqld_safe]
socket = /var/run/mysqld/mysqld.sock
nice = 0
syslog
@devarda
devarda / script.sh
Created February 26, 2020 21:05
Bash script shell script get script path of the file to solve relative path issue when you run the command
#!/bin/bash
SCRIPTPATH="$( cd "$(dirname "$0")" >/dev/null 2>&1 ; pwd -P )"
echo $SCRIPTPATH
@devarda
devarda / jquery.addrule.js
Created February 16, 2020 17:25 — forked from yckart/jquery.addrule.js
Add css-rules to an existing stylesheet - http://stackoverflow.com/a/16507264/1250044
/*!
* jquery.addrule.js 0.0.2 - https://gist.github.com/yckart/5563717/
* Add css-rules to an existing stylesheet.
*
* @see http://stackoverflow.com/a/16507264/1250044
*
* Copyright (c) 2013 Yannick Albert (http://yckart.com)
* Licensed under the MIT license (http://www.opensource.org/licenses/mit-license.php).
* 2013/11/23
**/
@devarda
devarda / jwtRS256.sh
Created February 12, 2020 22:03 — forked from ygotthilf/jwtRS256.sh
How to generate JWT RS256 key
ssh-keygen -t rsa -b 4096 -m PEM -f jwtRS256.key
# Don't add passphrase
openssl rsa -in jwtRS256.key -pubout -outform PEM -out jwtRS256.key.pub
cat jwtRS256.key
cat jwtRS256.key.pub
@devarda
devarda / ID.js
Created January 28, 2020 23:48
ID - a unique ID/name generator for JavaScript
// Generate unique IDs for use as pseudo-private/protected names.
// Similar in concept to
// <http://wiki.ecmascript.org/doku.php?id=strawman:names>.
//
// The goals of this function are twofold:
//
// * Provide a way to generate a string guaranteed to be unique when compared
// to other strings generated by this function.
// * Make the string complex enough that it is highly unlikely to be
// accidentally duplicated by hand (this is key if you're using `ID`
@devarda
devarda / city_names.js
Created January 14, 2020 20:38 — forked from norcal82/city_names.js
javascript array of major us city names
// javascript, coffeescript, jquery...
var city_names = ["Aberdeen", "Abilene", "Akron", "Albany", "Albuquerque", "Alexandria", "Allentown", "Amarillo", "Anaheim", "Anchorage", "Ann Arbor", "Antioch", "Apple Valley", "Appleton", "Arlington", "Arvada", "Asheville", "Athens", "Atlanta", "Atlantic City", "Augusta", "Aurora", "Austin", "Bakersfield", "Baltimore", "Barnstable", "Baton Rouge", "Beaumont", "Bel Air", "Bellevue", "Berkeley", "Bethlehem", "Billings", "Birmingham", "Bloomington", "Boise", "Boise City", "Bonita Springs", "Boston", "Boulder", "Bradenton", "Bremerton", "Bridgeport", "Brighton", "Brownsville", "Bryan", "Buffalo", "Burbank", "Burlington", "Cambridge", "Canton", "Cape Coral", "Carrollton", "Cary", "Cathedral City", "Cedar Rapids", "Champaign", "Chandler", "Charleston", "Charlotte", "Chattanooga", "Chesapeake", "Chicago", "Chula Vista", "Cincinnati", "Clarke County", "Clarksville", "Clearwater", "Cleveland", "College Station", "Colorado Springs", "Columbia", "Columbus", "Concord", "Coral Spri
@devarda
devarda / gulpfile.js
Created January 11, 2020 21:27 — forked from prplmark/gulpfile.js
Gulpfile with Webpack and SCSS watch
// Essentials
var gulp = require('gulp');
var webpack = require('webpack'); // Include webpack to add definePlugin
var webpackStream = require('webpack-stream'); // Use webpack-stream to compile
// Sass Requires
var sass = require('gulp-sass'); // Include SASS
var autoprefix = require('gulp-autoprefixer'); // Autoprefixer (always)
var rename = require('gulp-rename'); // Gulp Rename
var sourcemaps = require('gulp-sourcemaps'); // Sourcemaps (for sass)