Skip to content

Instantly share code, notes, and snippets.

@cagartner
cagartner / deploy.sh
Last active April 20, 2024 09:20
Laravel Push deploy Github actions example
#!/bin/sh
set -e
vendor/bin/phpunit
(git push) || true
git checkout production
git merge master
@rodgtr1
rodgtr1 / python_exercises.py
Last active April 20, 2024 09:19
Python exercises for Python Tutorial - https://youtu.be/f1E1NvcRvdc
# Install and Setup
# REPL
# VSCode & Extension
# 1. Variables / Types
@thegreatestminer
thegreatestminer / encoded-20201212150102.txt
Created December 12, 2020 15:01
MobaXTerm Professional x64 License Key [READ COMMENTS]
UEsDBBQAAAAIABNQjFGCf/GfLgAAACwAAAAHAAAAUHJvLmtleTMqdncpCXQOKDAp9woMzEo1MTVOrHAzTjTLME7VNs1LK8owTjQpcU8tcuLlAgBQSwECFAAUAAAACAATUIxRgn/xny4AAAAsAAAABwAAAAAAAAAAAAAAAAAAAAAAUHJvLmtleVBLBQYAAAAAAQABADUAAABTAAAAAAA=
@tankhang2004
tankhang2004 / helloworld.py
Created April 20, 2024 09:16
sample python
print('hello')
@leonjza
leonjza / README.md
Last active April 20, 2024 09:13
Forward a remote iOS device, locally.

fwd_ios.sh

Forwards a remote iOS device, exposed via usbmuxd on Linux to a local macOS client.
The inverse (aka ssh -R) is left as an excercise to the reader, but shouldn't be too hard :)

This is basically a simple usbfluxd that only depends on socat.

install

Copy the bash script to a local file, say fwd_ios.sh and make it executable with chmod +x fwd_ios.sh.

function setInputValueAndClickButton(value) {
const inputElement = document.getElementById('order-market-input');
if (inputElement) {
inputElement.value = value;
const inputEvent = new Event('input', {
bubbles: true,
cancelable: true,
});
@ashenoy463
ashenoy463 / report_template.tex
Created January 8, 2024 13:43
Boilerplate for reports with some useful packages
\documentclass[titlepage]{article}
%\documentclass[14pt,titlepage]{extarticle}
%\usepackage[a4paper, total={6in, 8in}]{geometry}
% ===========================
%Packages
\usepackage[utf8]{inputenc}
\usepackage[english]{babel}
\usepackage{graphicx,tikz,pgfplots}
\usepackage{physics}
\usepackage{amsthm,amsmath,amssymb,amsfonts,mathtools}
@samthecodingman
samthecodingman / bookmarklet-gcache.js
Last active April 20, 2024 09:08
Reload the current page using Google's Web Cache [Javascript Bookmarklet] [CC-BY License]
javascript:(window.location.href.indexOf("webcache.googleusercontent.com")>-1)?alert("Error:%20You%20are%20on%20the%20cached%20version."):window.location.assign("http://webcache.googleusercontent.com/search?q=cache:"+encodeURIComponent(window.location.href.replace(/(^\w+:|^)\/\//,'')));
@galiazzi
galiazzi / Cast.php
Last active April 20, 2024 09:07
Doctrine DQL cast function
<?php
use Doctrine\ORM\Query\AST\Functions\FunctionNode;
use Doctrine\ORM\Query\Lexer;
use Doctrine\ORM\Query\Parser;
use Doctrine\ORM\Query\SqlWalker;
class Cast extends FunctionNode
{
private $expr1;