Skip to content

Instantly share code, notes, and snippets.

View adeelahmad's full-sized avatar
🤖

Adeel Ahmad adeelahmad

🤖
View GitHub Profile
@jendiamond
jendiamond / gist:6128723
Last active April 11, 2024 11:35
Creating your own Gem & Command Line Interface Using Bundler

Presentation slides

Create a Gem - Make it a CLI - Add Rspec Tests

Create a Gem - Make it a Command Line Interface - Add Rspec Tests Using Bundler & Thor

#Creating your own Gem

  1. Run this command in your Terminal. This creates and names all the files you need for your gem. We are going to create a Lorem Ipsum Generator; you can call it whatever you want but seeing as we are creating a Lorem Ipsum generator we'll call it lorem. Read about gem naming conventions.
@y10g
y10g / CustomCSS.user.js
Created May 17, 2015 11:35
Custom.css for Tampermonkey
// ==UserScript==
// @name Custom.css
// @include http://*/*
// @include https://*/*
// @version 1
// ==/UserScript==
GM_addStyle((<><![CDATA[
@charset "UTF-8";
@bennokr
bennokr / bplist2json.py
Created March 1, 2016 17:57
Convert an Apple Binary Property List (bplist) to json
"""
Convert an Apple Binary Property List (bplist) to json
"""
import ccl_bplist # https://github.com/cclgroupltd/ccl-bplist
from datetime import datetime
def clean_archive(d):
if type(d) in [dict, ccl_bplist.NsKeyedArchiverDictionary]:
@lifuzu
lifuzu / sysctl.log
Created March 9, 2016 22:21
sysctl log on mac osx for evaluation python and nodejs
$ sysctl -A
user.cs_path: /usr/bin:/bin:/usr/sbin:/sbin
user.bc_base_max: 99
user.bc_dim_max: 2048
user.bc_scale_max: 99
user.bc_string_max: 1000
user.coll_weights_max: 2
user.expr_nest_max: 32
user.line_max: 2048
user.re_dup_max: 255
@m4vr0x
m4vr0x / iptables.sh
Last active December 3, 2025 06:24
Proxmox iptables rules script
#!/bin/sh
# ---------
# VARIABLES
# ---------
## Proxmox bridge holding Public IP
PrxPubVBR="vmbr0"
## Proxmox bridge on VmWanNET (PFSense WAN side)
PrxVmWanVBR="vmbr1"
@svzdvd
svzdvd / Reset OSX Time Machine Permissions
Created April 2, 2018 13:13
Reset OSX Time Machine Permissions
# Remove no-change attributes
sudo chflags nouchg ~/dir-to-fix
# Recursively clear all entended attributes
sudo xattr -rc ~/dir-to-fix
# Recursively reset to rational owner
sudo chown -R username:staff ~/dir-to-fix
# Recursively remove an ACL
#!/bin/bash
export MAKEFLAGS="-j 3"
set -e
BRANCH="1.14"
[ -n "$1" ] && BRANCH=$1
# Create a log file of the build as well as displaying the build on the tty as it runs
exec > >(tee build_gstreamer.log)
#!/bin/bash
set -ex
LXC_IMAGE=images:debian/11/cloud/armhf # base image for LXC container
USER=debian # exsting user with sudo inside the container
CONTAINER=gstreamer # the name of the container
[ -n "$1" ] && CONTAINER=$1 # can be set from the command line
@fs0c131y
fs0c131y / get_sqlcipher_password.js
Created January 27, 2019 20:57
Frida script to get the password of a sqlcipher database
/*
* get_sqlcipher_password.js
* Copyright (c) 2019 Elliot Alderson <fs0c131y@protonmail.com>
*
* Frida.re JS functions to get SQLCipher database passwords.
*
* Example usage:
* # frida -U -f in.gov.uidai.mAadhaarPlus -l get_sqlcipher_password.js --no-pause
*
*/
@Kcin1993
Kcin1993 / GraphQL + Typescript + Serverless Lambda + DynamoDB Knowhow.md
Last active December 20, 2022 06:42
實戰筆記 GraphQL, Typescript, Aws Lambda, DynamoDB, ElasticBeanstalk, Amplify KnowHow