#!/bin/bash
git checkout --orphan latest_branch # Checkout
git add -A # Add all the files
git commit -am "first commit" # Commit the changes
git branch -D master # Delete the branch
git branch -m master # Rename the current branch to master
git push -f origin master # Finally, force update your repository
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
defined('BASEPATH') OR exit('No direct script access allowed'); | |
use Carbon\Carbon; | |
class User extends Rest_Controller { | |
/** | |
* Uploads Path | |
*/ | |
const UPLOADS = FCPATH . 'uploads/'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[Desktop Entry] | |
Version=1.0 | |
Name=Firefox | |
Comment=Launch Firefox | |
Exec=/home/jagroop/firefox/./firefox | |
Icon=/home/jagroop/firefox/browser/icons/mozicon128.png | |
Terminal=false | |
Type=Application | |
Categories=Internet;Application; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class Request | |
{ | |
public static function __callStatic($method, $args) | |
{ | |
return RequestHandler::new()->{$method}(...$args); | |
} | |
} | |
class RequestHandler { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// 3:30 AM Cron job | |
public function threeAMCron() | |
{ | |
$this->db->where_in('id', [14, 60]); | |
$this->db->where("date_format(CONVERT_TZ(NOW(), 'UTC', local_tz), '%H:%i') = '15:30'"); | |
$users = $this->db->get('users')->result(); | |
$this->load->library('notification'); | |
foreach ($users as $key => $user) { | |
$this->notification->send($user, [ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo -s | |
sudo apt-get update | |
sudo apt-get install vsftpd | |
useradd -d /var/www/html/projects/ jagroop-pc | |
paswd jagroop-pc | |
# Configuration | |
write_enable=YES | |
pam_service_name=ftp |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
defined('BASEPATH') OR exit('No direct script access allowed'); | |
use Carbon\Carbon; | |
class Stripe { | |
/** | |
* Default Platform Country | |
* @var string | |
*/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@extends('layouts.admin.main') | |
@section('content') | |
<div class="row"> | |
<div class="col-md-12"> | |
<!-- Domain Search form starts --> | |
<form class="form-horizontal" method="GET" action="{{ route('projects.create') }}" id="projectForm"> | |
<div class="form-group{{ $errors->has('domain_name') ? ' has-error' : '' }}"> | |
<label for="domain_name" class="col-md-4 control-label">Project Name</label> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function multiRequest($data, $options = array()) { | |
$curly = array(); | |
$result = array(); | |
$mh = curl_multi_init(); | |
foreach ($data as $id => $d) { | |
$url = 'http://webcache.googleusercontent.com/search?q=cache:' . urlencode($d); | |
$curly[$id] = curl_init($url); | |
curl_setopt($curly[$id], CURLOPT_RETURNTRANSFER, false); | |
curl_setopt($curly[$id], CURLOPT_FOLLOWLOCATION, false); |
NewerOlder