Skip to content

Instantly share code, notes, and snippets.

View arzzen's full-sized avatar
Focusing

arzzen

Focusing
  • ☁️
  • ::1/128
View GitHub Profile
@psayre23
psayre23 / gist:c30a821239f4818b0709
Last active June 21, 2025 17:52
Runtime Complexity of Java Collections
Below are the Big O performance of common functions of different Java Collections.
List | Add | Remove | Get | Contains | Next | Data Structure
---------------------|------|--------|------|----------|------|---------------
ArrayList | O(1) | O(n) | O(1) | O(n) | O(1) | Array
LinkedList | O(1) | O(1) | O(n) | O(n) | O(1) | Linked List
CopyOnWriteArrayList | O(n) | O(n) | O(1) | O(n) | O(1) | Array
@yasuharu519
yasuharu519 / git-today
Last active January 28, 2017 11:20
git-today script
#!/bin/sh
LAST_BEFORE_TODAY=$(git log --oneline --until='yesterday 23:59:59' | head -1 | cut -d' ' -f 1)
AUTHOR="sawada_yasuharu"
echo "---------- git commit num today ---------"
git rev-list ${LAST_BEFORE_TODAY}..HEAD --count --author=${AUTHOR}
echo "---------- git commit summary today ---------"
git log ${LAST_BEFORE_TODAY}..HEAD --oneline --author=${AUTHOR}
@primeobsession
primeobsession / gist:f9d30c5ebc8b0486de14
Last active June 4, 2022 00:40
Install latest version of ImageMagick on Amazon Beanstalk
# Check if this is the very first time that this script is running
if ([ ! -f /root/.not-a-new-instance.txt ]) then
newEC2Instance=true
fi
if ([ $newEC2Instance ]) then
whoami
cd /tmp
@ghinda
ghinda / git-commit-csv-export.sh
Last active July 30, 2024 13:46
git csv export of commits in the last month
git log --since='last month' --pretty=format:'%h;%an;%ad;%s' --author='Ionut Colceriu' > ~/log.csv
<?php
namespace app\components;
use yii\base\UnknownPropertyException;
use yii\base\UnknownMethodException;
/**
* Prototype
*
@kennwhite
kennwhite / vpn_psk_bingo.md
Last active August 3, 2025 05:20
Most VPN Services are Terrible

Most VPN Services are Terrible

Short version: I strongly do not recommend using any of these providers. You are, of course, free to use whatever you like. My TL;DR advice: Roll your own and use Algo or Streisand. For messaging & voice, use Signal. For increased anonymity, use Tor for desktop (though recognize that doing so may actually put you at greater risk), and Onion Browser for mobile.

This mini-rant came on the heels of an interesting twitter discussion: https://twitter.com/kennwhite/status/591074055018582016

@chipoglesby
chipoglesby / gmail.gs
Last active October 25, 2018 06:44
Google App Script to Scan Gmail for payment emails from Adwords
var SPREADSHEET_URL = "url";
function main() {
var name = ("Google Adwords/Recieved Payment");
var label = GmailApp.getUserLabelByName(name);
var unreadCount = label.getUnreadCount();
var threads = label.getThreads(0,10);
for (var n = 0; n < threads.length; n++) {
var inbox = threads[n].isInInbox();
var message = threads[n].getMessages();
var lastDate = new Date(threads[n].getLastMessageDate());
@bhaku
bhaku / gitlab-list.groovy
Created June 22, 2015 18:17
Jenkins groovy script to get a list of latest git branches (with release/ prefix) and latest tags for a GitLab managed repository, usable with Jenkins Extensible Choice plugin and gitflow.
#!/usr/bin/env groovy
/**
* CONFIGURATION
*/
def private_token = "secret_token_from_gitlab"
def repository = "group/repository-name"
/* CONFIGURATION END */
def repository_name = repository.replace("/", "%2F");
@marcelbirkner
marcelbirkner / ciSeedJob.groovy
Last active October 21, 2022 13:55
Jenkins Job DSL Seed Job for Continuous Integration Jobs
import groovy.sql.Sql
import java.util.Date
import java.text.SimpleDateFormat
/*
* THIS IS AN EXAMPLE SNIPPET. FOR MORE DETAILS SEE THE FOLLOWING BLOG ARTICLE:
* https://blog.codecentric.de/en/?p=30502
*
* This Jenkins Job DSL Groovy Script creates Continuous Integration (CI) Jobs
* for all Maven & Ant projects that exist on a GitLab Server.
@jgamblin
jgamblin / censys.py
Created November 7, 2015 04:31
A Python Script To Search Cynsys.io
#!/usr/bin/env python
#-*- coding: utf-8 -*-
from termcolor import colored
import argparse
import json
import requests
import codecs
import locale
import os