Skip to content

Instantly share code, notes, and snippets.

View yasirrose's full-sized avatar

Yasir Shaukat yasirrose

  • Lahore
View GitHub Profile
@yasirrose
yasirrose / sc.json
Created November 8, 2021 15:06
SoundCloud Followers we save
{
"avatar_url": "https://a1.sndcdn.com/images/default_avatar_large.png",
"comments_count": 0,
"created_at": "2021-07-06T03:03:09Z",
"followers_count": 0,
"followings_count": 80,
"full_name": "Imari Imarhiagbe",
"username": "GGC😎",
"bio": null,
"scID": 1004985355,
@yasirrose
yasirrose / atx_php.sh
Created April 9, 2021 12:51
Install PHP and Composer on ATX Sites
#!/bin/bash
sudo apt autoremove -y
sudo apt install software-properties-common -y
sudo add-apt-repository ppa:ondrej/php -y
sudo apt update -y
sudo apt install -y zip unzip php8.0 php8.0-cli php8.0-common php8.0-curl php8.0-intl php8.0-mbstring php8.0-mysql php8.0-odbc php8.0-redis php8.0-sqlite3 php8.0-xml php8.0-zip php8.0-fpm
sudo systemctl enable php8.0-fpm
wget -O composer-setup.php https://getcomposer.org/installer
sudo php composer-setup.php --install-dir=/usr/local/bin --filename=composer
suro rm composer-setup.php
@yasirrose
yasirrose / pagination.cfm
Created April 1, 2021 11:14 — forked from steinbring/pagination.cfm
How to do pagination within ColdFusion This is an example of how to handle pagination in ColdFusion. This simple example can be manipulated by changing the values of the four variables at the top of the file.
<!--- How many pages should you link to at any one time? --->
<cfset intPagesToLinkTo = 5>
<!--- How many items are you displaying per page? --->
<cfset intItemsPerPage = 10>
<!--- How many items do you need to display, across all pages. --->
<cfset intNumberOfTotalItems = 100>
<!--- What is the current page you are on? --->
<cfif isdefined("url.page")>
<cfset intCurrentPage = val(url.page)>
<cfelse>
@yasirrose
yasirrose / gist:99bae64e904dc8db7473
Created November 19, 2014 16:28
rake db:schema:load Error
[deprecated] I18n.enforce_available_locales will default to true in the future. If you really want to skip validation of your locale you can set I18n.enforce_available_locales = false to avoid this message.
-- create_table("1099info", {:primary_key=>"data1099ID", :force=>true})
rake aborted!
Mysql2::Error: Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)
/Users/macomputer/Desktop/b/bpcnet-rails/db/schema.rb:16:in `block in <top (required)>'
/Users/macomputer/Desktop/b/bpcnet-rails/db/schema.rb:14:in `<top (required)>'
Tasks: TOP => db:schema:load
(See full trace by running task with --trace)
@yasirrose
yasirrose / gist:e28b1058dc61e059d732
Created May 27, 2014 17:23
result of select User,Host from mysql.user;
User Host
linux
root linux
localhost
pma localhost
root localhost
C:\Users\Zain Ul Abideen\Documents\GitHub\bpc>vagrant plugin install vagrant-ber
kshelf
Installing the 'vagrant-berkshelf' plugin. This can take a few minutes...
Bundler, the underlying system Vagrant uses to install plugins,
reported an error. The error is shown below. These errors are usually
caused by misconfigured plugin installations or transient network
issues. The error from Bundler is:
C:\Users\Zain Ul Abideen\Documents\GitHub\bpc>vagrant plugin install vagrant-ber
kshelf
Installing the 'vagrant-berkshelf' plugin. This can take a few minutes...
Bundler, the underlying system Vagrant uses to install plugins,
reported an error. The error is shown below. These errors are usually
caused by misconfigured plugin installations or transient network
issues. The error from Bundler is:
C:\Users\Zain Ul Abideen\Documents\GitHub\bpc>vagrant plugin install
This command was not invoked properly. The help for this command is
available below.
Usage: vagrant plugin install <name>... [-h]
--entry-point NAME The name of the entry point file for loadin
g the plugin.
# -*- mode: ruby -*-
# vi: set ft=ruby :
# Vagrantfile API/syntax version. Don't touch unless you know what you're doing!
VAGRANTFILE_API_VERSION = "2"
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
# All Vagrant configuration is done here. The most common configuration
# options are documented and commented below. For a complete reference,
# please see the online documentation at vagrantup.com.