Skip to content

Instantly share code, notes, and snippets.

@xpepper
xpepper / How to uninstall older versions of JDK on a OSX machine.md
Last active May 20, 2024 13:07
How to uninstall older versions of JDK on a OSX machine

How to cleanly uninstall older versions of JDK on a OSX machine

Say you want to remove the JDK 1.8.0_161:

Check that's installed with ls -1 /Library/Java/JavaVirtualMachines

for example:

$ ls -1 /Library/Java/JavaVirtualMachines
jdk1.7.0_80.jdk
@iKlotho
iKlotho / tckimlikdogrulama.py
Last active May 20, 2024 13:06
TC kimlik no sorgulama python
import xml.etree.ElementTree as ET
import requests
url = "https://tckimlik.nvi.gov.tr/Service/KPSPublic.asmx?WSDL"
headers = {"content-type": "text/xml"}
# Change this
tc_no = "XXXXXXXXXXXX"
ad = "NAME"
soyad = "SURNAME"
@ggerritsen
ggerritsen / rewrite-git-history.bash
Last active May 20, 2024 13:06
rewrite git commit history
#!/bin/bash
git filter-branch --env-filter '
WRONG_EMAIL="<work_email>"
NEW_NAME="ggerritsen" # github username
NEW_EMAIL="<github_email>"
if [ "$GIT_COMMITTER_EMAIL" = "$WRONG_EMAIL" ]
then
export GIT_COMMITTER_NAME="$NEW_NAME"
@leocomelli
leocomelli / git.md
Last active May 20, 2024 13:07
Lista de comandos úteis do GIT

GIT

Estados

  • Modificado (modified);
  • Preparado (staged/index)
  • Consolidado (comitted);

Ajuda

DevOps started out as "Agile Systems Administration". In 2008, Andrew Shafer did a talk called "Agile Infrastucture" addressing issues around involving more of the company in the same disciplines as programmers.

In 2009, Patrick Debois created "DevOpsDays" conference to help to bring it to light. However, it wouldn't begin to trend until about 2010, when people would begin to describe it as a standalone discipline.

Today, DevOps goes beyond just developers, systems administration and infrastructure, its about [dev, ops, agile, cloud, open source and business](https://blogs.the451group.com/opensource/2010/03/03/devops-mixing-dev-ops-agile-cloud-open-source-and-busi

@ayoubzulfiqar
ayoubzulfiqar / folder_structure.md
Created September 5, 2023 06:12
The Folder Structure for Every Golang Project

Go - The Ultimate Folder Structure

Organizing your Go (Golang) project's folder structure can help improve code readability, maintainability, and scalability. While there is no one-size-fits-all structure, here's a common folder structure for a Go project:

project-root/
    ├── cmd/
    │   ├── your-app-name/
    │   │   ├── main.go         # Application entry point
    │   │   └── ...             # Other application-specific files
@Rouji
Rouji / pull_apks.py
Created July 1, 2018 23:09
adb pull all installed .apk files from /data/app while renaming from base.apk to the package name
#!/usr/bin/env python3
from subprocess import check_output, run
from re import compile
from sys import stdout
reg = compile(r'^package:(.*).apk=(.*)$')
cmd = ['adb', 'shell', 'pm', 'list', 'packages', '-f', '-3']
print(*cmd)
for line in check_output(cmd).decode(stdout.encoding).splitlines():
m = reg.match(line)
@Flova
Flova / plot_grad_flow.py
Last active May 20, 2024 13:02
Plot the gradient flow (PyTorch)
# Based on https://discuss.pytorch.org/t/check-gradient-flow-in-network/15063/10
def plot_grad_flow(named_parameters):
'''Plots the gradients flowing through different layers in the net during training.
Can be used for checking for possible gradient vanishing / exploding problems.
Usage: Plug this function in Trainer class after loss.backwards() as
"plot_grad_flow(self.model.named_parameters())" to visualize the gradient flow'''
ave_grads = []
max_grads= []
@ghoseb
ghoseb / ns-cheatsheet.clj
Last active May 20, 2024 13:01 — forked from alandipert/ns-cheatsheet.clj
Clojure ns syntax cheat-sheet
;;
;; NS CHEATSHEET
;;
;; * :require makes functions available with a namespace prefix
;; and optionally can refer functions to the current ns.
;;
;; * :import refers Java classes to the current namespace.
;;
;; * :refer-clojure affects availability of built-in (clojure.core)
;; functions.
@PurpleBooth
PurpleBooth / README-Template.md
Last active May 20, 2024 13:01
A template to make good README.md

Project Title

One Paragraph of project description goes here

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisites