Skip to content

Instantly share code, notes, and snippets.

View sayopaul's full-sized avatar
🏠
Working from home

Sayo Paul sayopaul

🏠
Working from home
View GitHub Profile
#include <stdio.h>
#include <stdlib.h>
typedef struct stuffox{
int x;
struct stuffox* next;
}stuffox;
// instead of returning a new stuffox*, could've just changed the calling function's memory
// by defining as void Cons(int d, stuffox** list)
@segebee
segebee / banks.html
Last active February 25, 2025 14:50
Nigerian Commercial Banks Select Drop down
<select class="form-control " id="bank">
<option selected>Choose</option>
<option value="access">Access Bank</option>
<option value="citibank">Citibank</option>
<option value="diamond">Diamond Bank</option>
<option value="ecobank">Ecobank</option>
<option value="fidelity">Fidelity Bank</option>
<option value="firstbank">First Bank</option>
<option value="fcmb">First City Monument Bank (FCMB)</option>
<option value="gtb">Guaranty Trust Bank (GTB)</option>
@devNoiseConsulting
devNoiseConsulting / gist:fb6195fbd09bfb2c1f81367dd9e727ed
Last active December 9, 2020 05:33 — forked from romainneutron/gist:5340930
Download large files using Guzzle 6.3
<?php
require __DIR__ . '/vendor/autoload.php';
use GuzzleHttp\Client;
$url = "https://domain.tld/large-file.mp4";
$tmpFile = tempnam(sys_get_temp_dir(), 'guzzle-download');
$client = new Client(array(
@flaviocopes
flaviocopes / check-substring-starts-with.go
Last active June 23, 2024 09:05
Go: check if a string starts with a substring #golang
package main
import (
"strings"
)
func main() {
strings.HasPrefix("foobar", "foo") // true
}
@myshov
myshov / function_invocation.js
Last active August 19, 2024 12:23
11 Ways to Invoke a Function
console.log(1);
(_ => console.log(2))();
eval('console.log(3);');
console.log.call(null, 4);
console.log.apply(null, [5]);
new Function('console.log(6)')();
Reflect.apply(console.log, null, [7])
Reflect.construct(function(){console.log(8)}, []);
Function.prototype.apply.call(console.log, null, [9]);
Function.prototype.call.call(console.log, null, 10);
@oxguy3
oxguy3 / deploy.php
Last active April 16, 2025 07:58
Script used to automatically deploy from GitHub to a cPanel shared hosting server
<?php
/**
* deploy.php by Hayden Schiff (oxguy3)
* Available at https://gist.github.com/oxguy3/70ea582d951d4b0f78edec282a2bebf9
*
* No rights reserved. Dedicated to public domain via CC0 1.0 Universal.
* See https://creativecommons.org/publicdomain/zero/1.0/ for terms.
*/
// random string of characters; must match the "Secret" defined in your GitHub webhook
@wangruohui
wangruohui / Install NVIDIA Driver and CUDA.md
Last active April 2, 2025 07:38
Install NVIDIA Driver and CUDA on Ubuntu / CentOS / Fedora Linux OS
@franciscocpg
franciscocpg / ubuntu-google-cloud-sdk-install.sh
Last active March 25, 2017 21:09
Google Cloud SDK install
# Reference: https://cloud.google.com/sdk/#deb
# Create an environment variable for the correct distribution
export CLOUD_SDK_REPO="cloud-sdk-$(lsb_release -c -s)"
# Add the Cloud SDK distribution URI as a package source
echo "deb http://packages.cloud.google.com/apt $CLOUD_SDK_REPO main" | sudo tee /etc/apt/sources.list.d/google-cloud-sdk.list
# Import the Google Cloud public key
curl https://packages.cloud.google.com/apt/doc/apt-key.gpg | sudo apt-key add -
@renshuki
renshuki / ubuntu_agnoster_install.md
Last active December 30, 2024 16:16
Ubuntu 16.04 + Terminator + Oh My ZSH with Agnoster Theme

Install Terminator (shell)

sudo add-apt-repository ppa:gnome-terminator
sudo apt-get update
sudo apt-get install terminator

Terminator should be setup as default now. Restart your terminal (shortcut: "Ctrl+Alt+T").

Install ZSH