Skip to content

Instantly share code, notes, and snippets.

@monkeyphysics
monkeyphysics / App\Casts\Point.php
Last active May 6, 2024 07:47
Laravel MySQL Point Cast class
<?php
namespace App\Casts;
use Illuminate\Support\Facades\DB;
use Illuminate\Contracts\Database\Eloquent\CastsAttributes;
// todo: make it even better by implementing a Point class and working with that
class Point implements CastsAttributes
@lopspower
lopspower / README.md
Last active May 6, 2024 07:47
Material Animations

Material Animations

Android Arsenal

[Android Transition Framework][transition-framework] can be used for three main things:

  1. Animate activity layout content when transitioning from one activity to another.
  2. Animate shared elements (Hero views) in transitions between activities.
  3. Animate view changes within same activity.
@barryvdh
barryvdh / _ide_helper.php
Last active May 6, 2024 07:45
Laravel IDE Helper for Netbeans / PhpStorm / Sublime Text 2 CodeIntel, generated using https://github.com/barryvdh/laravel-ide-helper
<?php
/**
* A helper file for Laravel 5, to provide autocomplete information to your IDE
* Generated for Laravel 5.5.13 on 2017-09-28.
*
* @author Barry vd. Heuvel <barryvdh@gmail.com>
* @see https://github.com/barryvdh/laravel-ide-helper
*/
namespace {
exit("This file should not be included, only analyzed by your IDE");
@NEbere
NEbere / sns-subscription.js
Created October 19, 2021 14:56
simple code to show SNS topic subscription, confirmation and notification handling via expressJS
const express = require('express')
const AWS = require("aws-sdk")
var bodyParser = require('body-parser')
const MessageValidator = require('sns-validator')
var jsonParser = bodyParser.json()
const config = {
"SNS_TOPIC_ARN": "",
"USER_ARN": "",
"USER_ACCESS_KEY_ID": "",
@A1vinSmith
A1vinSmith / Privilege Escalation.md
Last active May 6, 2024 07:45
Privilege Escalation: Systemctl (Misconfigured Permissions — sudo/SUID)
@Aid2310
Aid2310 / index.html
Created May 6, 2024 07:40
Bsod prank
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Open+Sans:ital,wght@0,300..800;1,300..800&display=swap" rel="stylesheet">
<link rel="stylesheet" href="style.css">
<link rel="icon" type="image/x-icon" href="https://www.iconpacks.net/icons/2/free-sad-face-icon-2691-thumb.png">
@alectrocute
alectrocute / NGINXNodejsLinode.md
Last active May 6, 2024 07:40
Quick n' easy NGINX & Node.js VPS setup!

Quick n' easy NGINX & Node.js VPS setup!

N|SolidN|Solid N|Solid

Here's the quickest and easiest guide to setting up a little test enviorment. This guide likely applies to any VPS provider or VPS, not just Linode... it's just what I prefer to use. Assuming you know the basics of Linode's VPS system and SSH commands, let's get started!

Configure your Linode

  • Install your favorite flavor of Linux. I prefer Ubuntu.
@jmurudi
jmurudi / PrintOddEven.cpp
Last active May 6, 2024 07:38
Print odd even from 2 different thrreds using C++11 Thread
#include "iostream"
#include "thread"
#include "mutex"
#include "condition_variable"
using namespace std;
std::mutex mu;
std::condition_variable cond;
int count = 1;
# Edit this file to introduce tasks to be run by cron.
#
# Each task to run has to be defined through a single line
# indicating with different fields when the task will be run
# and what command to run for the task
#
# To define the time you can provide concrete values for
# minute (m), hour (h), day of month (dom), month (mon),
# and day of week (dow) or use '*' in these fields (for 'any').
#